Coping Flexibility and Strategy Use Predict Burnout: A Longitudinal Study

Authors
Affiliation

Rebecca Kirkham

Monash University

Joshua F. Wiley

Monash University

Published

January 1, 2026

1 Loading Packages

Code
library(readxl)
library(tidyr)
library(dplyr)

Attaching package: 'dplyr'
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
Code
library(psych)
Warning: package 'psych' was built under R version 4.4.2
Code
library(writexl)
library(mice)
Warning: package 'mice' was built under R version 4.4.2

Attaching package: 'mice'
The following object is masked from 'package:stats':

    filter
The following objects are masked from 'package:base':

    cbind, rbind
Code
library(scales)

Attaching package: 'scales'
The following objects are masked from 'package:psych':

    alpha, rescale
Code
library(ggplot2)

Attaching package: 'ggplot2'
The following objects are masked from 'package:psych':

    %+%, alpha
Code
library(gridExtra)

Attaching package: 'gridExtra'
The following object is masked from 'package:dplyr':

    combine
Code
library(car) 
Warning: package 'car' was built under R version 4.4.2
Loading required package: carData
Warning: package 'carData' was built under R version 4.4.2

Attaching package: 'car'
The following object is masked from 'package:psych':

    logit
The following object is masked from 'package:dplyr':

    recode
Code
library(lmtest)
Warning: package 'lmtest' was built under R version 4.4.2
Loading required package: zoo

Attaching package: 'zoo'
The following objects are masked from 'package:base':

    as.Date, as.Date.numeric
Code
library(lm.beta)
Warning: package 'lm.beta' was built under R version 4.4.3

2 Read in the Data

Code
setwd("~/Clin PhD/Research Project/Study. 3 Quantitative Study ER flex/Data/Burnout Paper/")

df_CC <- read_excel("~/Clin PhD/Research Project/Study. 3 Quantitative Study ER flex/Data/Burnout Paper/Dataset_clean+scored_CCExcl_100725.xlsx")
  #from df, AFTER subsetting to complete cases and removing 3x influential PIDs were excluded based on assumption checks from complete case analyses

df <- read_excel("~/Clin PhD/Research Project/Study. 3 Quantitative Study ER flex/Data/Burnout Paper/Dataset_clean+scored_MIExcl_100725.xlsx")
  #from df, AFTER 3x influential PIDs were excluded based on assumption checks from MI models

Interim steps included data preparation, scoring, multiple imputation preparation, and assumption checking for the complete case dataset. These sections are presented below the main analysis code. They were conducted on earlier versions of the dataset, with outputs saved and used to generate the final dataset for analysis. The workflow is documented in full to provide transparency and reproducibility.

Note that throughout the data file the term ER (emotion regulation) is used interchangeably with Coping.

3 Checking assumptions to run complete case dataset

Code
# vars_to_check <- c(
#   "T2_BAT12_Exhaustion", "T2_BAT12_Cognitive", "T2_BAT12_Emotion", "T2_BAT12_MentalDistance",
#   "T1_BAT12_Exhaustion", "T1_BAT12_Cognitive", "T1_BAT12_Emotion", "T1_BAT12_MentalDistance",
#   "T1_PSS4", "Age_2024", "T1_Gender_MW", "T1_EducationMI",
#   "T1_COPE_SelfDistraction", "T1_COPE_ActiveCoping", "T1_COPE_Denial", "T1_COPE_SubstanceUse",
#   "T1_COPE_BehavioralDisengagement", "T1_COPE_Religion", "T1_COPE_Venting",
#   "T1_COPE_UseOfInstrumentalSupport", "T1_COPE_PositiveReframing", "T1_COPE_SelfBlame",
#   "T1_COPE_Planning", "T1_COPE_Humor", "T1_COPE_Acceptance",
#   "T1_CFS_Adaptive", "T1_CFS_Evaluation_new", "CST_switchcost.1"
# )
# 
# # Create the subset with complete data
# #df_CC <- df[complete.cases(df[, vars_to_check]), ]
# nrow(df_CC)
# 
# hist(df$T2_BAT12_Cognitive) #ok
# hist(df$T2_BAT12_Emotion) #skewed
# hist(df$T2_BAT12_Exhaustion) #ok
# hist(df$T2_BAT12_MentalDistance) #ok
# 
# # BAT12Cog_model_A_Cov <- lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_CC)
# # summary(BAT12Cog_model_A_Cov)
# BAT12Cog_model_A_Cov <- readRDS("BAT12Cog_model_A_Cov.RDS")
# hist(resid(BAT12Cog_model_A_Cov), breaks = 30) #normal
# hist(scale(resid(BAT12Cog_model_A_Cov)), breaks = 30) #one outlier
# 
# # #Winsorize to address the outliers.
# # # Calculate the 1st and 99th percentiles
# # lower_percentileT2 <- quantile(df_CC$T2_BAT12_Cognitive, 0.01, na.rm = TRUE)
# # upper_percentileT2 <- quantile(df_CC$T2_BAT12_Cognitive, 0.99, na.rm = TRUE)
# # lower_percentileT1 <- quantile(df_CC$T1_BAT12_Cognitive, 0.01, na.rm = TRUE)
# # upper_percentileT1 <- quantile(df_CC$T1_BAT12_Cognitive, 0.99, na.rm = TRUE)
# # 
# # # Winsorize the variable manually
# # df_CC$T2_BAT12_Cognitive_winsorized <- df_CC$T2_BAT12_Cognitive
# # df_CC$T2_BAT12_Cognitive_winsorized[df_CC$T2_BAT12_Cognitive < lower_percentileT2] <- lower_percentileT2
# # df_CC$T2_BAT12_Cognitive_winsorized[df_CC$T2_BAT12_Cognitive > upper_percentileT2] <- upper_percentileT2
# # 
# # df_CC$T1_BAT12_Cognitive_winsorized <- df_CC$T1_BAT12_Cognitive
# # df_CC$T1_BAT12_Cognitive_winsorized[df_CC$T1_BAT12_Cognitive < lower_percentileT1] <- lower_percentileT1
# # df_CC$T1_BAT12_Cognitive_winsorized[df_CC$T1_BAT12_Cognitive > upper_percentileT1] <- upper_percentileT1
# 
# hist(df_CC$T2_BAT12_Cognitive_winsorized)
# 
# # BAT12Cog_model_A_Cov_wins <- lm(T2_BAT12_Cognitive_winsorized ~ T1_BAT12_Cognitive_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_CC)
# # summary(BAT12Cog_model_A_Cov_wins)
# BAT12Cog_model_A_Cov_wins <- readRDS("BAT12Cog_model_A_Cov_wins.RDS")
# hist(scale(resid(BAT12Cog_model_A_Cov_wins)), breaks = 30) #originally one outlier
# 
# #the one outlier remains after winsorization. Move to step 2b. 
# df[which(abs(scale(resid(BAT12Cog_model_A_Cov))) > 3), c("PID")] #tells us which PIDs are outliers
# #originally 1209 
# df_BAT12Cog_model_A_Cov_wo <- df_CC[!(df_CC$PID %in% c("1209")), ]
# BAT12Cog_model_A_Cov_wo <- lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_BAT12Cog_model_A_Cov_wo)
# hist(resid(BAT12Cog_model_A_Cov_wo), breaks = 30) #normal
# 
# summary(BAT12Cog_model_A_Cov) 
# summary(BAT12Cog_model_A_Cov_wo)
# # the one outlier did not impact the summary, so proceed with it included.
# 
# BAT12Emo_model_A_Cov <- lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_CC)
# summary(BAT12Emo_model_A_Cov)
# 
# hist(resid(BAT12Emo_model_A_Cov), breaks = 30) #mostly normal
# hist(scale(resid(BAT12Emo_model_A_Cov)), breaks = 30) #some outlier
# 
# lower_percentileT2 <- quantile(df_CC$T2_BAT12_Emotion, 0.01, na.rm = TRUE)
# upper_percentileT2 <- quantile(df_CC$T2_BAT12_Emotion, 0.99, na.rm = TRUE)
# lower_percentileT1 <- quantile(df_CC$T1_BAT12_Emotion, 0.01, na.rm = TRUE)
# upper_percentileT1 <- quantile(df_CC$T1_BAT12_Emotion, 0.99, na.rm = TRUE)
# 
# # Winsorize the variable manually
# df_CC$T2_BAT12_Emotion_winsorized <- df_CC$T2_BAT12_Emotion
# df_CC$T2_BAT12_Emotion_winsorized[df_CC$T2_BAT12_Emotion < lower_percentileT2] <- lower_percentileT2
# df_CC$T2_BAT12_Emotion_winsorized[df_CC$T2_BAT12_Emotion > upper_percentileT2] <- upper_percentileT2
# 
# df_CC$T1_BAT12_Emotion_winsorized <- df_CC$T1_BAT12_Emotion
# df_CC$T1_BAT12_Emotion_winsorized[df_CC$T1_BAT12_Emotion < lower_percentileT1] <- lower_percentileT1
# df_CC$T1_BAT12_Emotion_winsorized[df_CC$T1_BAT12_Emotion > upper_percentileT1] <- upper_percentileT1
# 
# hist(df_CC$T2_BAT12_Emotion_winsorized)
# 
# BAT12Emo_model_A_Cov_wins <- lm(T2_BAT12_Emotion_winsorized ~ T1_BAT12_Emotion_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_CC)
# summary(BAT12Emo_model_A_Cov_wins)
# hist(scale(resid(BAT12Emo_model_A_Cov_wins)), breaks = 30) #still outliers
# 
# #the outliers remain after winsorization. Move to step 2b. 
# df_CC[which(abs(scale(resid(BAT12Emo_model_A_Cov))) > 3), c("PID")] #tells us which PIDs are outliers
# #1187, 1231 
# df_BAT12Emo_model_A_Cov_wo <- df_CC[!(df_CC$PID %in% c("1187", "1231")), ]
# BAT12Emo_model_A_Cov_wo <- lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_BAT12Emo_model_A_Cov_wo)
# hist(resid(BAT12Emo_model_A_Cov_wo), breaks = 30) #normal
# 
# summary(BAT12Emo_model_A_Cov) 
# summary(BAT12Emo_model_A_Cov_wo)
# # the outliers did not impact the .05s summary, so proceed with it included.
# 
# BAT12Ment_model_A_Cov <- lm(T2_BAT12_MentalDistance ~ T2_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_CC)
# summary(BAT12Ment_model_A_Cov)
# hist(resid(BAT12Ment_model_A_Cov), breaks = 30) #normal
# hist(scale(resid(BAT12Ment_model_A_Cov)), breaks = 30) 
# #no outliers 
# 
# BAT12Exh_model_A_Cov <- lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_CC)
# summary(BAT12Exh_model_A_Cov)
# hist(resid(BAT12Exh_model_A_Cov), breaks = 30) #normal
# hist(scale(resid(BAT12Exh_model_A_Cov)), breaks = 30) #lower outliers
# 
# lower_percentileT2 <- quantile(df_CC$T2_BAT12_Exhaustion, 0.01, na.rm = TRUE)
# upper_percentileT2 <- quantile(df_CC$T2_BAT12_Exhaustion, 0.99, na.rm = TRUE)
# lower_percentileT1 <- quantile(df_CC$T1_BAT12_Exhaustion, 0.01, na.rm = TRUE)
# upper_percentileT1 <- quantile(df_CC$T1_BAT12_Exhaustion, 0.99, na.rm = TRUE)
# 
# # Winsorize the variable manually
# df_CC$T2_BAT12_Exhaustion_winsorized <- df_CC$T2_BAT12_Exhaustion
# df_CC$T2_BAT12_Exhaustion_winsorized[df_CC$T2_BAT12_Exhaustion < lower_percentileT2] <- lower_percentileT2
# df_CC$T2_BAT12_Exhaustion_winsorized[df_CC$T2_BAT12_Exhaustion > upper_percentileT2] <- upper_percentileT2
# 
# df_CC$T1_BAT12_Exhaustion_winsorized <- df_CC$T1_BAT12_Exhaustion
# df_CC$T1_BAT12_Exhaustion_winsorized[df_CC$T1_BAT12_Exhaustion < lower_percentileT1] <- lower_percentileT1
# df_CC$T1_BAT12_Exhaustion_winsorized[df_CC$T1_BAT12_Exhaustion > upper_percentileT1] <- upper_percentileT1
# 
# hist(df_CC$T2_BAT12_Exhaustion_winsorized)
# 
# BAT12Exh_model_A_Cov_wins <- lm(T2_BAT12_Exhaustion_winsorized ~ T1_BAT12_Exhaustion_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_CC)
# summary(BAT12Exh_model_A_Cov_wins)
# hist(scale(resid(BAT12Exh_model_A_Cov_wins)), breaks = 30) #still outliers at lower end
# 
# df_CC[which(abs(scale(resid(BAT12Exh_model_A_Cov))) > 3), c("PID")] #tells us which PIDs are outliers
# #2001
# df_BAT12Exh_model_A_Cov_wo <- df_CC[!(df_CC$PID %in% c("2001")), ]
# BAT12Exh_model_A_Cov_wo <- lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_BAT12Exh_model_A_Cov_wo)
# hist(resid(BAT12Exh_model_A_Cov_wo), breaks = 30) #normal
# 
# summary(BAT12Exh_model_A_Cov) 
# summary(BAT12Exh_model_A_Cov_wo)
# # the outliers did impact the summary, Gender became sig, so proceed with it excluded from all analyses after this round of checks
# 
# #Model B checks
# BAT12Cog_model_B_ERall <- lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW
#                              + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                              + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                              + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                              + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                              + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance, data = df_CC)
# summary(BAT12Cog_model_B_ERall)
# 
# hist(resid(BAT12Cog_model_B_ERall), breaks = 30) #normal
# hist(scale(resid(BAT12Cog_model_B_ERall)), breaks = 30) #upper outlier
# 
# hist(df_CC$T2_BAT12_Cognitive_winsorized)
# 
# BAT12Cog_model_B_ERall_wins <- lm(T2_BAT12_Cognitive_winsorized ~ T1_BAT12_Cognitive_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW
#                              + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                              + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                              + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                              + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                              + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance, data = df_CC)
# summary(BAT12Cog_model_B_ERall_wins)
# 
# hist(scale(resid(BAT12Cog_model_B_ERall_wins)), breaks = 30) #still outliers
# 
# #the outliers remain after winsorization. Move to step 2b. 
# df_CC[which(abs(scale(resid(BAT12Cog_model_B_ERall))) > 3), c("PID")] #tells us which PIDs are outliers
# #1231 
# df_BAT12Cog_model_B_ERall_wo <- df_CC[!(df_CC$PID %in% c("1231")), ]
# BAT12Cog_model_B_ERall_wo <- lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW
#                                   + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                                   + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                                   + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                                   + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                                   + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance, data = df_BAT12Cog_model_B_ERall_wo)
# 
# hist(resid(BAT12Cog_model_B_ERall_wo), breaks = 30) #normal
# 
# summary(BAT12Cog_model_B_ERall) 
# summary(BAT12Cog_model_B_ERall_wo)
# # the outliers did not impact the .05s summary, so proceed with it included.
# 
# BAT12Emo_model_B_ERall <- lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW
#                              + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                              + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                              + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                              + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                              + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance, data = df_CC)
# summary(BAT12Emo_model_B_ERall)
# 
# hist(resid(BAT12Emo_model_B_ERall), breaks = 30) #mostly normal
# hist(scale(resid(BAT12Emo_model_B_ERall)), breaks = 30) #some outlier
# 
# hist(df_CC$T2_BAT12_Emotion_winsorized)
# 
# BAT12Emo_model_B_ERall_wins <- lm(T2_BAT12_Emotion_winsorized ~ T1_BAT12_Emotion_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW
#                              + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                              + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                              + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                              + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                              + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance, data = df_CC)
# summary(BAT12Emo_model_B_ERall_wins)
# 
# hist(scale(resid(BAT12Emo_model_B_ERall_wins)), breaks = 30) #still outliers
# 
# #the outliers remain after winsorization. Move to step 2b. 
# df_CC[which(abs(scale(resid(BAT12Emo_model_B_ERall))) > 3), c("PID")] #tells us which PIDs are outliers
# #2274, 1231 
# df_BAT12Emo_model_B_ERall_wo <- df_CC[!(df_CC$PID %in% c("2274", "1231")), ]
# BAT12Emo_model_B_ERall_wo <- lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW
#                              + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                              + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                              + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                              + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                              + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance, data = df_BAT12Emo_model_B_ERall_wo)
# 
# hist(resid(BAT12Emo_model_B_ERall_wo), breaks = 30) #normal
# 
# summary(BAT12Emo_model_B_ERall) 
# summary(BAT12Emo_model_B_ERall_wo)
# # the outliers did not impact the .05s summary, so proceed with it included.
# 
# BAT12Ment_model_B_ERall <- lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW
#                               + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                               + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                               + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                               + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                               + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance, data = df_CC)
# summary(BAT12Ment_model_B_ERall)
# 
# hist(resid(BAT12Ment_model_B_ERall), breaks = 30) #mostly normal
# hist(scale(resid(BAT12Ment_model_B_ERall)), breaks = 30) #some outlier
# 
# hist(df_CC$T2_BAT12_MentalDistance_winsorized)
# 
# # Calculate the 1st and 99th percentiles
# lower_percentileT2 <- quantile(df_CC$T2_BAT12_MentalDistance, 0.01, na.rm = TRUE)
# upper_percentileT2 <- quantile(df_CC$T2_BAT12_MentalDistance, 0.99, na.rm = TRUE)
# lower_percentileT1 <- quantile(df_CC$T1_BAT12_MentalDistance, 0.01, na.rm = TRUE)
# upper_percentileT1 <- quantile(df_CC$T1_BAT12_MentalDistance, 0.99, na.rm = TRUE)
# 
# # Winsorize the variable manually
# df_CC$T2_BAT12_MentalDistance_winsorized <- df_CC$T2_BAT12_MentalDistance
# df_CC$T2_BAT12_MentalDistance_winsorized[df_CC$T2_BAT12_MentalDistance < lower_percentileT2] <- lower_percentileT2
# df_CC$T2_BAT12_MentalDistance_winsorized[df_CC$T2_BAT12_MentalDistance > upper_percentileT2] <- upper_percentileT2
# 
# df_CC$T1_BAT12_MentalDistance_winsorized <- df_CC$T1_BAT12_MentalDistance
# df_CC$T1_BAT12_MentalDistance_winsorized[df_CC$T1_BAT12_MentalDistance < lower_percentileT1] <- lower_percentileT1
# df_CC$T1_BAT12_MentalDistance_winsorized[df_CC$T1_BAT12_MentalDistance > upper_percentileT1] <- upper_percentileT1
# 
# hist(df_CC$T2_BAT12_MentalDistance_winsorized)
# 
# BAT12Ment_model_B_ERall_wins <- lm(T2_BAT12_MentalDistance_winsorized ~ T1_BAT12_MentalDistance_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW
#                                   + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                                   + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                                   + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                                   + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                                   + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance, data = df_CC)
# summary(BAT12Ment_model_B_ERall_wins)
# 
# hist(scale(resid(BAT12Ment_model_B_ERall_wins)), breaks = 30) #still outliers
# 
# #the outliers remain after winsorization. Move to step 2b. 
# df_CC[which(abs(scale(resid(BAT12Ment_model_B_ERall))) > 3), c("PID")] #tells us which PIDs are outliers
# #1269, 1231 
# df_BAT12Ment_model_B_ERall_wo <- df_CC[!(df_CC$PID %in% c("1269", "1231")), ]
# BAT12Ment_model_B_ERall_wo <- lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW
#                                 + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                                 + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                                 + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                                 + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                                 + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance, data = df_BAT12Ment_model_B_ERall_wo)
# 
# hist(resid(BAT12Ment_model_B_ERall_wo), breaks = 30) #normal
# 
# summary(BAT12Ment_model_B_ERall) 
# summary(BAT12Ment_model_B_ERall_wo)
# # the outliers did impact the .05s summary, so will remove 1269, 1231 after these checks.
# 
# BAT12Exh_model_B_ERall <- lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW
#                              + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                              + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                              + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                              + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                              + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance, data = df_CC)
# summary(BAT12Exh_model_B_ERall)
# 
# hist(resid(BAT12Exh_model_B_ERall), breaks = 30) #normal
# hist(scale(resid(BAT12Exh_model_B_ERall)), breaks = 30) #no outliers
# 
# #Model C
# BAT12Cog_model_C_CST <- lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, data = df_CC)
# summary(BAT12Cog_model_C_CST)
# 
# hist(resid(BAT12Cog_model_C_CST), breaks = 30) #normal
# hist(scale(resid(BAT12Cog_model_C_CST)), breaks = 30) #one upper outlier
# 
# hist(df_CC$T2_BAT12_Cognitive_winsorized)
# 
# BAT12Cog_model_C_CST_wins <- lm(T2_BAT12_Cognitive_winsorized ~ T1_BAT12_Cognitive_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, data = df_CC)
# summary(BAT12Cog_model_C_CST_wins)
# 
# hist(scale(resid(BAT12Cog_model_C_CST_wins)), breaks = 30) #still outliers
# 
# #the outliers remain after winsorization. Move to step 2b. 
# df_CC[which(abs(scale(resid(BAT12Cog_model_C_CST))) > 3), c("PID")] #tells us which PIDs are outliers
# #1231 
# df_BAT12Cog_model_C_CST_wo <- df_CC[!(df_CC$PID %in% c("1231")), ]
# BAT12Cog_model_C_CST_wo <- lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, data = df_BAT12Cog_model_C_CST_wo)
# 
# hist(resid(BAT12Cog_model_C_CST_wo), breaks = 30) #normal
# 
# summary(BAT12Cog_model_C_CST) 
# summary(BAT12Cog_model_C_CST_wo)
# # the outliers did not impact the .05s summary, so proceed with it included.
# 
# BAT12Emo_model_C_CST <- lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, data = df_CC)
# summary(BAT12Emo_model_C_CST)
# 
# hist(resid(BAT12Emo_model_C_CST), breaks = 30) #mostly normal
# hist(scale(resid(BAT12Emo_model_C_CST)), breaks = 30) #some outlier
# 
# hist(df_CC$T2_BAT12_Emotion_winsorized)
# 
# BAT12Emo_model_C_CST_wins <- lm(T2_BAT12_Emotion_winsorized ~ T1_BAT12_Emotion_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, data = df_CC)
# summary(BAT12Emo_model_C_CST_wins)
# 
# hist(scale(resid(BAT12Emo_model_C_CST_wins)), breaks = 30) #still outliers
# 
# #the outliers remain after winsorization. Move to step 2b. 
# df_CC[which(abs(scale(resid(BAT12Emo_model_C_CST))) > 3), c("PID")] #tells us which PIDs are outliers
# #1187 , 1231
# df_BAT12Emo_model_C_CST_wo <- df_CC[!(df_CC$PID %in% c("1187", "1231")), ]
# BAT12Emo_model_C_CST_wo <- lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, data = df_BAT12Emo_model_C_CST_wo)
# 
# hist(resid(BAT12Emo_model_C_CST_wo), breaks = 30) #normal
# 
# summary(BAT12Emo_model_C_CST) 
# summary(BAT12Emo_model_C_CST_wo)
# # the outliers did not impact the .05s summary, so proceed with it included.
# 
# BAT12Ment_model_C_CST <- lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, data = df_CC)
# summary(BAT12Ment_model_C_CST)
# 
# hist(resid(BAT12Ment_model_C_CST), breaks = 30) #mostly normal
# hist(scale(resid(BAT12Ment_model_C_CST)), breaks = 30) #some outlier
# 
# hist(df_CC$T2_BAT12_MentalDistance_winsorized)
# 
# BAT12Ment_model_C_CST_wins <- lm(T2_BAT12_MentalDistance_winsorized ~ T1_BAT12_MentalDistance_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, data = df_CC)
# summary(BAT12Ment_model_C_CST_wins)
# 
# hist(scale(resid(BAT12Ment_model_C_CST_wins)), breaks = 30) #still outliers
# 
# #the outliers remain after winsorization. Move to step 2b. 
# df_CC[which(abs(scale(resid(BAT12Ment_model_C_CST))) > 3), c("PID")] #tells us which PIDs are outliers
# #1269, 1231, 1229 
# df_BAT12Ment_model_C_CST_wo <- df_CC[!(df_CC$PID %in% c("1269", "1231", "1229")), ]
# BAT12Ment_model_C_CST_wo <- lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, data = df_BAT12Ment_model_C_CST_wo)
# 
# hist(resid(BAT12Ment_model_C_CST_wo), breaks = 30) #normal
# 
# summary(BAT12Ment_model_C_CST) 
# summary(BAT12Ment_model_C_CST_wo)
# # the outliers did not impact the .05s predictors summary
# 
# BAT12Exh_model_C_CST <- lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, data = df_CC)
# summary(BAT12Exh_model_C_CST)
# 
# hist(resid(BAT12Exh_model_C_CST), breaks = 30) #normal
# hist(scale(resid(BAT12Exh_model_C_CST)), breaks = 30) #some outliers
# 
# hist(df_CC$T2_BAT12_Exhaustion_winsorized)
# 
# BAT12Exh_model_C_CST_wins <- lm(T2_BAT12_Exhaustion_winsorized ~ T1_BAT12_Exhaustion_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, data = df_CC)
# summary(BAT12Exh_model_C_CST_wins)
# hist(scale(resid(BAT12Exh_model_C_CST_wins)), breaks = 30) #still outliers at lower end
# 
# df_CC[which(abs(scale(resid(BAT12Exh_model_C_CST))) > 3), c("PID")] #tells us which PIDs are outliers
# #2001
# df_BAT12Exh_model_C_CST_wo <- df_CC[!(df_CC$PID %in% c("2001")), ]
# BAT12Exh_model_C_CST_wo <- lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, data = df_BAT12Exh_model_C_CST_wo)
# hist(resid(BAT12Exh_model_C_CST_wo), breaks = 30) #normal
# 
# summary(BAT12Exh_model_C_CST) 
# summary(BAT12Exh_model_C_CST_wo)
# 
# # the outliers did impact the .05s summary, so will remove 2001 after these checks.
# 
# #Model D
# BAT12Cog_model_D_CFS <- lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new, data = df_CC)
# summary(BAT12Cog_model_D_CFS)
# 
# hist(resid(BAT12Cog_model_D_CFS), breaks = 30) #normal
# hist(scale(resid(BAT12Cog_model_D_CFS)), breaks = 30) #one upper outlier
# 
# hist(df_CC$T2_BAT12_Cognitive_winsorized)
# 
# BAT12Cog_model_D_CFS_wins <- lm(T2_BAT12_Cognitive_winsorized ~ T1_BAT12_Cognitive_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new, data = df_CC)
# summary(BAT12Cog_model_D_CFS_wins)
# 
# hist(scale(resid(BAT12Cog_model_D_CFS_wins)), breaks = 30) #still outliers
# 
# #the outliers remain after winsorization. Move to step 2b. 
# df_CC[which(abs(scale(resid(BAT12Cog_model_D_CFS))) > 3), c("PID")] #tells us which PIDs are outliers
# #1231 
# df_BAT12Cog_model_D_CFS_wo <- df_CC[!(df_CC$PID %in% c("1231")), ]
# BAT12Cog_model_D_CFS_wo <- lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new, data = df_BAT12Cog_model_D_CFS_wo)
# 
# hist(resid(BAT12Cog_model_D_CFS_wo), breaks = 30) #normal
# 
# summary(BAT12Cog_model_D_CFS) 
# summary(BAT12Cog_model_D_CFS_wo)
# # the outliers did impact the .05s summary, so will exclude after these checks
# 
# BAT12Emo_model_D_CFS <- lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new, data = df_CC)
# summary(BAT12Emo_model_D_CFS)
# 
# hist(resid(BAT12Emo_model_D_CFS), breaks = 30) #mostly normal
# hist(scale(resid(BAT12Emo_model_D_CFS)), breaks = 30) #some outlier
# 
# hist(df_CC$T2_BAT12_Emotion_winsorized)
# 
# BAT12Emo_model_D_CFS_wins <- lm(T2_BAT12_Emotion_winsorized ~ T1_BAT12_Emotion_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new, data = df_CC)
# summary(BAT12Emo_model_D_CFS_wins)
# 
# hist(scale(resid(BAT12Emo_model_D_CFS_wins)), breaks = 30) #still outliers
# 
# #the outliers remain after winsorization. Move to step 2b. 
# df_CC[which(abs(scale(resid(BAT12Emo_model_D_CFS))) > 3), c("PID")] #tells us which PIDs are outliers
# #1187 , 1231
# df_BAT12Emo_model_D_CFS_wo <- df_CC[!(df_CC$PID %in% c("1187", "1231")), ]
# BAT12Emo_model_D_CFS_wo <- lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new, data = df_BAT12Emo_model_D_CFS_wo)
# 
# hist(resid(BAT12Emo_model_D_CFS_wo), breaks = 30) #normal
# 
# summary(BAT12Emo_model_D_CFS) 
# summary(BAT12Emo_model_D_CFS_wo)
# # the outliers did not impact the .05s summary, so proceed with it included.
# 
# BAT12Ment_model_D_CFS <- lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new, data = df_CC)
# summary(BAT12Ment_model_D_CFS)
# 
# hist(resid(BAT12Ment_model_D_CFS), breaks = 30) #mostly normal
# hist(scale(resid(BAT12Ment_model_D_CFS)), breaks = 30) #some outlier
# 
# hist(df_CC$T2_BAT12_MentalDistance_winsorized)
# 
# BAT12Ment_model_D_CFS_wins <- lm(T2_BAT12_MentalDistance_winsorized ~ T1_BAT12_MentalDistance_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new, data = df_CC)
# summary(BAT12Ment_model_D_CFS_wins)
# 
# hist(scale(resid(BAT12Ment_model_D_CFS_wins)), breaks = 30) #still outliers
# 
# #the outliers remain after winsorization. Move to step 2b. 
# df_CC[which(abs(scale(resid(BAT12Ment_model_D_CFS))) > 3), c("PID")] #tells us which PIDs are outliers
# #1269, 1231, 1229 
# df_BAT12Ment_model_D_CFS_wo <- df_CC[!(df_CC$PID %in% c("1269", "1231", "1229")), ]
# BAT12Ment_model_D_CFS_wo <- lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new, data = df_BAT12Ment_model_D_CFS_wo)
# 
# hist(resid(BAT12Ment_model_D_CFS_wo), breaks = 30) #normal
# 
# summary(BAT12Ment_model_D_CFS) 
# summary(BAT12Ment_model_D_CFS_wo)
# # the outliers did not impact the .05s predictors summary
# 
# BAT12Exh_model_D_CFS <- lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new, data = df_CC)
# summary(BAT12Exh_model_D_CFS)
# 
# hist(resid(BAT12Exh_model_D_CFS), breaks = 30) #normal
# hist(scale(resid(BAT12Exh_model_D_CFS)), breaks = 30) #some outliers
# 
# hist(df_CC$T2_BAT12_Exhaustion_winsorized)
# 
# BAT12Exh_model_D_CFS_wins <- lm(T2_BAT12_Exhaustion_winsorized ~ T1_BAT12_Exhaustion_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new, data = df_CC)
# summary(BAT12Exh_model_D_CFS_wins)
# hist(scale(resid(BAT12Exh_model_D_CFS_wins)), breaks = 30) #still outliers at lower end
# 
# df_CC[which(abs(scale(resid(BAT12Exh_model_D_CFS))) > 3), c("PID")] #tells us which PIDs are outliers
# #2001
# df_BAT12Exh_model_D_CFS_wo <- df_CC[!(df_CC$PID %in% c("2001")), ]
# BAT12Exh_model_D_CFS_wo <- lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new, data = df_BAT12Exh_model_D_CFS_wo)
# hist(resid(BAT12Exh_model_D_CFS_wo), breaks = 30) #normal
# 
# summary(BAT12Exh_model_D_CFS) 
# summary(BAT12Exh_model_D_CFS_wo)
# 
# # the outliers did impact the .05s summary, so will remove 2001 after these checks.
# 
# #Model E
# BAT12Cog_model_E_all <- lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
#                            + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse  
#                            + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting 
#                            + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
#                            + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance
#                            + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1, data = df_CC)
# summary(BAT12Cog_model_E_all)
# 
# hist(resid(BAT12Cog_model_E_all), breaks = 30) #normal
# hist(scale(resid(BAT12Cog_model_E_all)), breaks = 30) #one upper outlier
# 
# hist(df_CC$T2_BAT12_Cognitive_winsorized)
# 
# BAT12Cog_model_E_all_wins <- lm(T2_BAT12_Cognitive_winsorized ~ T1_BAT12_Cognitive_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
#                                 + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse  
#                                 + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting 
#                                 + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
#                                 + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance
#                                 + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1, data = df_CC)
# summary(BAT12Cog_model_E_all_wins)
# 
# hist(scale(resid(BAT12Cog_model_E_all_wins)), breaks = 30) #still outliers
# 
# #the outliers remain after winsorization. Move to step 2b. 
# df_CC[which(abs(scale(resid(BAT12Cog_model_E_all))) > 3), c("PID")] #tells us which PIDs are outliers
# #1231 
# df_BAT12Cog_model_E_all_wo <- df_CC[!(df_CC$PID %in% c("1231")), ]
# BAT12Cog_model_E_all_wo <- lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
#                               + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse  
#                               + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting 
#                               + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
#                               + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance
#                               + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1, data = df_BAT12Cog_model_E_all_wo)
# 
# hist(resid(BAT12Cog_model_E_all_wo), breaks = 30) #normal
# 
# summary(BAT12Cog_model_E_all) 
# summary(BAT12Cog_model_E_all_wo)
# # the outliers did impact the .05s summary, so will exclude after these checks
# 
# BAT12Emo_model_E_all <- lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
#                            + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse  
#                            + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting 
#                            + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
#                            + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance
#                            + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1, data = df_CC)
# summary(BAT12Emo_model_E_all)
# 
# hist(resid(BAT12Emo_model_E_all), breaks = 30) #mostly normal
# hist(scale(resid(BAT12Emo_model_E_all)), breaks = 30) #some outlier
# 
# hist(df_CC$T2_BAT12_Emotion_winsorized)
# 
# BAT12Emo_model_E_all_wins <- lm(T2_BAT12_Emotion_winsorized ~ T1_BAT12_Emotion_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
#                                 + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse  
#                                 + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting 
#                                 + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
#                                 + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance
#                                 + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1, data = df_CC)
# summary(BAT12Emo_model_E_all_wins)
# 
# hist(scale(resid(BAT12Emo_model_E_all_wins)), breaks = 30) #still outliers
# 
# #the outliers remain after winsorization. Move to step 2b. 
# df_CC[which(abs(scale(resid(BAT12Emo_model_E_all))) > 3), c("PID")] #tells us which PIDs are outliers
# #2274, 1231
# df_BAT12Emo_model_E_all_wo <- df_CC[!(df_CC$PID %in% c("2274", "1231")), ]
# BAT12Emo_model_E_all_wo <- lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
#                               + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse  
#                               + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting 
#                               + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
#                               + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance
#                               + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1, data = df_BAT12Emo_model_E_all_wo)
# 
# hist(resid(BAT12Emo_model_E_all_wo), breaks = 30) #normal
# 
# summary(BAT12Emo_model_E_all) 
# summary(BAT12Emo_model_E_all_wo)
# # the outliers did not impact the .05s summary, so proceed with it included.
# 
# BAT12Ment_model_E_all <- lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
#                             + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse  
#                             + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting 
#                             + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
#                             + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance
#                             + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1, data = df_CC)
# summary(BAT12Ment_model_E_all)
# 
# hist(resid(BAT12Ment_model_E_all), breaks = 30) #mostly normal
# hist(scale(resid(BAT12Ment_model_E_all)), breaks = 30) #some outlier
# 
# hist(df_CC$T2_BAT12_MentalDistance_winsorized)
# 
# BAT12Ment_model_E_all_wins <- lm(T2_BAT12_MentalDistance_winsorized ~ T1_BAT12_MentalDistance_winsorized + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
#                                  + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse  
#                                  + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting 
#                                  + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
#                                  + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance
#                                  + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1, data = df_CC)
# summary(BAT12Ment_model_E_all_wins)
# 
# hist(scale(resid(BAT12Ment_model_E_all_wins)), breaks = 30) #still outliers
# 
# #the outliers remain after winsorization. Move to step 2b. 
# df_CC[which(abs(scale(resid(BAT12Ment_model_E_all))) > 3), c("PID")] #tells us which PIDs are outliers
# #1269, 1231 
# df_BAT12Ment_model_E_all_wo <- df_CC[!(df_CC$PID %in% c("1269", "1231")), ]
# BAT12Ment_model_E_all_wo <- lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
#                                + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse  
#                                + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting 
#                                + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
#                                + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance
#                                + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1, data = df_BAT12Ment_model_E_all_wo)
# 
# hist(resid(BAT12Ment_model_E_all_wo), breaks = 30) #normal
# 
# summary(BAT12Ment_model_E_all) 
# summary(BAT12Ment_model_E_all_wo)
# # the outliers did impact the .05s predictors summary, so will remove
# 
# BAT12Exh_model_E_all <- lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
#                            + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse  
#                            + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting 
#                            + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
#                            + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance
#                            + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1, data = df_CC)
# summary(BAT12Exh_model_E_all)
# 
# hist(resid(BAT12Exh_model_E_all), breaks = 30) #normal
# hist(scale(resid(BAT12Exh_model_E_all)), breaks = 30) #no outliers
# 
# #Conclusion from all checks = remove 3 influential outliers - 1269, 1231, 2001 
# df_CC <- df_CC[!(df_CC$PID %in% c("1269", "1231", "2001")), ]
# nrow(df_CC) #less 3

4 Checking cronbach’s alpha of key predictors and outcomes

Code
##COPE
SelfDistraction_alpha <- df[, c("T1_COPE_1", "T1_COPE_19")]
psych::alpha(SelfDistraction_alpha)

Reliability analysis   
Call: psych::alpha(x = SelfDistraction_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
       0.5       0.5    0.34      0.34   1 0.054  2.6 0.78     0.34

    95% confidence boundaries 
         lower alpha upper
Feldt     0.38   0.5  0.60
Duhachek  0.40   0.5  0.61

 Reliability if an item is dropped:
           raw_alpha std.alpha G6(smc) average_r  S/N alpha se var.r med.r
T1_COPE_1       0.33      0.34    0.11      0.34 0.51       NA     0  0.34
T1_COPE_19      0.34      0.34    0.11      0.34 0.51       NA     0  0.34

 Item statistics 
             n raw.r std.r r.cor r.drop mean   sd
T1_COPE_1  329  0.81  0.82  0.47   0.34  2.4 0.95
T1_COPE_19 329  0.82  0.82  0.47   0.34  2.7 0.97

Non missing response frequency for each item
              1    2    3    4 miss
T1_COPE_1  0.20 0.35 0.31 0.13 0.02
T1_COPE_19 0.12 0.26 0.37 0.25 0.02
Code
ActiveCoping_alpha <- df[, c("T1_COPE_2", "T1_COPE_7")]
psych::alpha(ActiveCoping_alpha)

Reliability analysis   
Call: psych::alpha(x = ActiveCoping_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.77      0.77    0.62      0.62 3.3 0.025  2.5 0.83     0.62

    95% confidence boundaries 
         lower alpha upper
Feldt     0.71  0.77  0.81
Duhachek  0.72  0.77  0.82

 Reliability if an item is dropped:
          raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
T1_COPE_2      0.62      0.62    0.39      0.62 1.7       NA     0  0.62
T1_COPE_7      0.63      0.62    0.39      0.62 1.7       NA     0  0.62

 Item statistics 
            n raw.r std.r r.cor r.drop mean   sd
T1_COPE_2 329   0.9   0.9  0.71   0.62  2.4 0.91
T1_COPE_7 329   0.9   0.9  0.71   0.62  2.5 0.92

Non missing response frequency for each item
             1    2    3    4 miss
T1_COPE_2 0.16 0.38 0.33 0.13 0.02
T1_COPE_7 0.15 0.33 0.37 0.15 0.02
Code
Denial_alpha <- df[, c("T1_COPE_3", "T1_COPE_8")]
psych::alpha(Denial_alpha)

Reliability analysis   
Call: psych::alpha(x = Denial_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.74      0.74    0.59      0.59 2.9 0.028  1.3 0.59     0.59

    95% confidence boundaries 
         lower alpha upper
Feldt     0.68  0.74  0.79
Duhachek  0.69  0.74  0.80

 Reliability if an item is dropped:
          raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
T1_COPE_3      0.55      0.59    0.35      0.59 1.4       NA     0  0.59
T1_COPE_8      0.63      0.59    0.35      0.59 1.4       NA     0  0.59

 Item statistics 
            n raw.r std.r r.cor r.drop mean   sd
T1_COPE_3 329  0.88  0.89  0.68   0.59  1.3 0.64
T1_COPE_8 329  0.90  0.89  0.68   0.59  1.3 0.68

Non missing response frequency for each item
             1    2    3    4 miss
T1_COPE_3 0.74 0.20 0.05 0.02 0.02
T1_COPE_8 0.75 0.18 0.05 0.02 0.02
Code
SubstanceUse_alpha <- df[, c("T1_COPE_4", "T1_COPE_11")]
psych::alpha(SubstanceUse_alpha)

Reliability analysis   
Call: psych::alpha(x = SubstanceUse_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N    ase mean   sd median_r
      0.93      0.93    0.87      0.87  13 0.0079  1.3 0.56     0.87

    95% confidence boundaries 
         lower alpha upper
Feldt     0.91  0.93  0.94
Duhachek  0.91  0.93  0.94

 Reliability if an item is dropped:
           raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
T1_COPE_4       0.93      0.87    0.75      0.87 6.5       NA     0  0.87
T1_COPE_11      0.81      0.87    0.75      0.87 6.5       NA     0  0.87

 Item statistics 
             n raw.r std.r r.cor r.drop mean   sd
T1_COPE_4  329  0.97  0.97   0.9   0.87  1.3 0.60
T1_COPE_11 329  0.96  0.97   0.9   0.87  1.2 0.56

Non missing response frequency for each item
              1    2    3    4 miss
T1_COPE_4  0.78 0.16 0.06 0.01 0.02
T1_COPE_11 0.83 0.12 0.04 0.01 0.02
Code
UseOfEmotionalSupport_alpha <- df[, c("T1_COPE_5", "T1_COPE_15")]
psych::alpha(UseOfEmotionalSupport_alpha)

Reliability analysis   
Call: psych::alpha(x = UseOfEmotionalSupport_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.76      0.76    0.62      0.62 3.2 0.026  2.3 0.83     0.62

    95% confidence boundaries 
         lower alpha upper
Feldt     0.71  0.76  0.81
Duhachek  0.71  0.76  0.81

 Reliability if an item is dropped:
           raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
T1_COPE_5       0.58      0.62    0.38      0.62 1.6       NA     0  0.62
T1_COPE_15      0.66      0.62    0.38      0.62 1.6       NA     0  0.62

 Item statistics 
             n raw.r std.r r.cor r.drop mean   sd
T1_COPE_5  329  0.89   0.9  0.71   0.62  2.2 0.89
T1_COPE_15 329  0.91   0.9  0.71   0.62  2.3 0.95

Non missing response frequency for each item
              1    2    3    4 miss
T1_COPE_5  0.21 0.44 0.26 0.09 0.02
T1_COPE_15 0.23 0.35 0.30 0.11 0.02
Code
BehavioralDisengagement_alpha <- df[, c("T1_COPE_6", "T1_COPE_16")]
psych::alpha(BehavioralDisengagement_alpha)

Reliability analysis   
Call: psych::alpha(x = BehavioralDisengagement_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.64      0.65    0.48      0.48 1.9 0.038  1.5 0.63     0.48

    95% confidence boundaries 
         lower alpha upper
Feldt     0.56  0.64  0.71
Duhachek  0.57  0.64  0.72

 Reliability if an item is dropped:
           raw_alpha std.alpha G6(smc) average_r  S/N alpha se var.r med.r
T1_COPE_6       0.58      0.48    0.23      0.48 0.93       NA     0  0.48
T1_COPE_16      0.40      0.48    0.23      0.48 0.93       NA     0  0.48

 Item statistics 
             n raw.r std.r r.cor r.drop mean   sd
T1_COPE_6  329  0.89  0.86   0.6   0.48  1.6 0.79
T1_COPE_16 329  0.83  0.86   0.6   0.48  1.4 0.66

Non missing response frequency for each item
              1    2    3    4 miss
T1_COPE_6  0.55 0.31 0.11 0.03 0.02
T1_COPE_16 0.71 0.21 0.06 0.01 0.02
Code
Religion_alpha <- df[, c("T1_COPE_22", "T1_COPE_27")]
psych::alpha(Religion_alpha)

Reliability analysis   
Call: psych::alpha(x = Religion_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.82      0.82     0.7       0.7 4.6 0.019  1.6 0.85      0.7

    95% confidence boundaries 
         lower alpha upper
Feldt     0.78  0.82  0.86
Duhachek  0.78  0.82  0.86

 Reliability if an item is dropped:
           raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
T1_COPE_22      0.72       0.7    0.49       0.7 2.3       NA     0   0.7
T1_COPE_27      0.68       0.7    0.49       0.7 2.3       NA     0   0.7

 Item statistics 
             n raw.r std.r r.cor r.drop mean   sd
T1_COPE_22 329  0.92  0.92  0.77    0.7  1.6 0.93
T1_COPE_27 329  0.92  0.92  0.77    0.7  1.6 0.91

Non missing response frequency for each item
              1    2    3    4 miss
T1_COPE_22 0.66 0.18 0.09 0.08 0.02
T1_COPE_27 0.61 0.23 0.09 0.07 0.02
Code
Venting_alpha <- df[, c("T1_COPE_9", "T1_COPE_21")]
psych::alpha(Venting_alpha)

Reliability analysis   
Call: psych::alpha(x = Venting_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.52      0.52    0.35      0.35 1.1 0.052    2 0.69     0.35

    95% confidence boundaries 
         lower alpha upper
Feldt     0.41  0.52  0.61
Duhachek  0.42  0.52  0.62

 Reliability if an item is dropped:
           raw_alpha std.alpha G6(smc) average_r  S/N alpha se var.r med.r
T1_COPE_9       0.33      0.35    0.12      0.35 0.54       NA     0  0.35
T1_COPE_21      0.38      0.35    0.12      0.35 0.54       NA     0  0.35

 Item statistics 
             n raw.r std.r r.cor r.drop mean   sd
T1_COPE_9  329  0.81  0.82  0.49   0.35  1.8 0.81
T1_COPE_21 329  0.84  0.82  0.49   0.35  2.2 0.87

Non missing response frequency for each item
              1    2    3    4 miss
T1_COPE_9  0.43 0.38 0.17 0.02 0.02
T1_COPE_21 0.23 0.43 0.27 0.07 0.02
Code
UseOfInstrumentalSupport_alpha <- df[, c("T1_COPE_10", "T1_COPE_23")]
psych::alpha(UseOfInstrumentalSupport_alpha)

Reliability analysis   
Call: psych::alpha(x = UseOfInstrumentalSupport_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N  ase mean   sd median_r
      0.81      0.81    0.69      0.69 4.4 0.02  2.2 0.81     0.69

    95% confidence boundaries 
         lower alpha upper
Feldt     0.77  0.81  0.85
Duhachek  0.77  0.81  0.85

 Reliability if an item is dropped:
           raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
T1_COPE_10      0.65      0.69    0.47      0.69 2.2       NA     0  0.69
T1_COPE_23      0.72      0.69    0.47      0.69 2.2       NA     0  0.69

 Item statistics 
             n raw.r std.r r.cor r.drop mean   sd
T1_COPE_10 329  0.91  0.92  0.76   0.69  2.2 0.86
T1_COPE_23 329  0.92  0.92  0.76   0.69  2.1 0.91

Non missing response frequency for each item
              1    2    3    4 miss
T1_COPE_10 0.21 0.44 0.27 0.08 0.02
T1_COPE_23 0.26 0.42 0.23 0.09 0.02
Code
PositiveReframing_alpha <- df[, c("T1_COPE_12", "T1_COPE_17")]
psych::alpha(PositiveReframing_alpha)

Reliability analysis   
Call: psych::alpha(x = PositiveReframing_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.79      0.79    0.65      0.65 3.7 0.023  2.3 0.85     0.65

    95% confidence boundaries 
         lower alpha upper
Feldt     0.74  0.79  0.83
Duhachek  0.74  0.79  0.83

 Reliability if an item is dropped:
           raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
T1_COPE_12      0.66      0.65    0.42      0.65 1.9       NA     0  0.65
T1_COPE_17      0.64      0.65    0.42      0.65 1.9       NA     0  0.65

 Item statistics 
             n raw.r std.r r.cor r.drop mean   sd
T1_COPE_12 329  0.91  0.91  0.73   0.65  2.3 0.95
T1_COPE_17 329  0.91  0.91  0.73   0.65  2.3 0.93

Non missing response frequency for each item
              1    2    3    4 miss
T1_COPE_12 0.23 0.35 0.31 0.11 0.02
T1_COPE_17 0.20 0.37 0.31 0.12 0.02
Code
SelfBlame_alpha <- df[, c("T1_COPE_13", "T1_COPE_26")]
psych::alpha(SelfBlame_alpha)

Reliability analysis   
Call: psych::alpha(x = SelfBlame_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.69      0.69    0.53      0.53 2.2 0.034  2.1 0.81     0.53

    95% confidence boundaries 
         lower alpha upper
Feldt     0.61  0.69  0.75
Duhachek  0.62  0.69  0.76

 Reliability if an item is dropped:
           raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
T1_COPE_13      0.54      0.53    0.28      0.53 1.1       NA     0  0.53
T1_COPE_26      0.52      0.53    0.28      0.53 1.1       NA     0  0.53

 Item statistics 
             n raw.r std.r r.cor r.drop mean   sd
T1_COPE_13 329  0.88  0.87  0.63   0.53  2.2 0.94
T1_COPE_26 329  0.87  0.87  0.63   0.53  1.9 0.92

Non missing response frequency for each item
              1    2    3    4 miss
T1_COPE_13 0.24 0.40 0.26 0.11 0.02
T1_COPE_26 0.42 0.35 0.16 0.07 0.02
Code
Planning_alpha <- df[, c("T1_COPE_14", "T1_COPE_25")]
psych::alpha(Planning_alpha)

Reliability analysis   
Call: psych::alpha(x = Planning_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.78      0.78    0.64      0.64 3.5 0.024  2.5 0.84     0.64

    95% confidence boundaries 
         lower alpha upper
Feldt     0.72  0.78  0.82
Duhachek  0.73  0.78  0.82

 Reliability if an item is dropped:
           raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
T1_COPE_14      0.63      0.64     0.4      0.64 1.7       NA     0  0.64
T1_COPE_25      0.64      0.64     0.4      0.64 1.7       NA     0  0.64

 Item statistics 
             n raw.r std.r r.cor r.drop mean   sd
T1_COPE_14 329  0.90   0.9  0.72   0.64  2.5 0.92
T1_COPE_25 329  0.91   0.9  0.72   0.64  2.5 0.93

Non missing response frequency for each item
              1    2    3    4 miss
T1_COPE_14 0.15 0.34 0.36 0.15 0.02
T1_COPE_25 0.17 0.33 0.36 0.14 0.02
Code
Humor_alpha <- df[, c("T1_COPE_18", "T1_COPE_28")]
psych::alpha(Humor_alpha)

Reliability analysis   
Call: psych::alpha(x = Humor_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.84      0.84    0.73      0.73 5.4 0.017  2.1 0.89     0.73

    95% confidence boundaries 
         lower alpha upper
Feldt     0.81  0.84  0.87
Duhachek  0.81  0.84  0.88

 Reliability if an item is dropped:
           raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
T1_COPE_18      0.74      0.73    0.53      0.73 2.7       NA     0  0.73
T1_COPE_28      0.72      0.73    0.53      0.73 2.7       NA     0  0.73

 Item statistics 
             n raw.r std.r r.cor r.drop mean   sd
T1_COPE_18 329  0.93  0.93  0.79   0.73  2.2 0.97
T1_COPE_28 329  0.93  0.93  0.79   0.73  1.9 0.95

Non missing response frequency for each item
              1    2    3    4 miss
T1_COPE_18 0.26 0.37 0.25 0.12 0.02
T1_COPE_28 0.44 0.32 0.16 0.08 0.02
Code
Acceptance_alpha <- df[, c("T1_COPE_20", "T1_COPE_24")]
psych::alpha(Acceptance_alpha)

Reliability analysis   
Call: psych::alpha(x = Acceptance_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N  ase mean   sd median_r
      0.73      0.73    0.57      0.57 2.7 0.03  2.8 0.81     0.57

    95% confidence boundaries 
         lower alpha upper
Feldt     0.66  0.73  0.78
Duhachek  0.67  0.73  0.78

 Reliability if an item is dropped:
           raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
T1_COPE_20      0.59      0.57    0.33      0.57 1.3       NA     0  0.57
T1_COPE_24      0.55      0.57    0.33      0.57 1.3       NA     0  0.57

 Item statistics 
             n raw.r std.r r.cor r.drop mean   sd
T1_COPE_20 329  0.89  0.89  0.67   0.57  2.8 0.93
T1_COPE_24 329  0.88  0.89  0.67   0.57  2.7 0.90

Non missing response frequency for each item
              1    2    3    4 miss
T1_COPE_20 0.10 0.27 0.39 0.24 0.02
T1_COPE_24 0.09 0.31 0.38 0.22 0.02
Code
PFC_alpha <- df[, c("T1_COPE_2", "T1_COPE_7", "T1_COPE_10", "T1_COPE_12", "T1_COPE_14", "T1_COPE_17", "T1_COPE_23", "T1_COPE_25")]
psych::alpha(PFC_alpha)

Reliability analysis   
Call: psych::alpha(x = PFC_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.87      0.87    0.88      0.45 6.6 0.011  2.4 0.66      0.4

    95% confidence boundaries 
         lower alpha upper
Feldt     0.85  0.87  0.89
Duhachek  0.85  0.87  0.89

 Reliability if an item is dropped:
           raw_alpha std.alpha G6(smc) average_r S/N alpha se  var.r med.r
T1_COPE_2       0.86      0.85    0.86      0.46 5.9    0.012 0.0115  0.40
T1_COPE_7       0.85      0.85    0.86      0.44 5.6    0.013 0.0128  0.40
T1_COPE_10      0.86      0.86    0.86      0.47 6.2    0.012 0.0096  0.45
T1_COPE_12      0.85      0.85    0.86      0.45 5.7    0.012 0.0129  0.40
T1_COPE_14      0.84      0.84    0.86      0.43 5.4    0.013 0.0126  0.40
T1_COPE_17      0.86      0.86    0.86      0.46 5.9    0.012 0.0122  0.40
T1_COPE_23      0.86      0.86    0.86      0.46 6.0    0.012 0.0116  0.45
T1_COPE_25      0.85      0.85    0.86      0.44 5.5    0.013 0.0134  0.40

 Item statistics 
             n raw.r std.r r.cor r.drop mean   sd
T1_COPE_2  329  0.70  0.70  0.65   0.60  2.4 0.91
T1_COPE_7  329  0.75  0.75  0.70   0.65  2.5 0.92
T1_COPE_10 329  0.65  0.66  0.61   0.54  2.2 0.86
T1_COPE_12 329  0.73  0.73  0.68   0.63  2.3 0.95
T1_COPE_14 329  0.79  0.79  0.75   0.71  2.5 0.92
T1_COPE_17 329  0.70  0.69  0.64   0.59  2.3 0.93
T1_COPE_23 329  0.68  0.69  0.65   0.58  2.1 0.91
T1_COPE_25 329  0.77  0.77  0.72   0.68  2.5 0.93

Non missing response frequency for each item
              1    2    3    4 miss
T1_COPE_2  0.16 0.38 0.33 0.13 0.02
T1_COPE_7  0.15 0.33 0.37 0.15 0.02
T1_COPE_10 0.21 0.44 0.27 0.08 0.02
T1_COPE_12 0.23 0.35 0.31 0.11 0.02
T1_COPE_14 0.15 0.34 0.36 0.15 0.02
T1_COPE_17 0.20 0.37 0.31 0.12 0.02
T1_COPE_23 0.26 0.42 0.23 0.09 0.02
T1_COPE_25 0.17 0.33 0.36 0.14 0.02
Code
EFC_alpha <- df[, c("T1_COPE_5", "T1_COPE_9", "T1_COPE_13", "T1_COPE_15", "T1_COPE_18", "T1_COPE_20", "T1_COPE_21", "T1_COPE_22", "T1_COPE_24", "T1_COPE_26", "T1_COPE_27", "T1_COPE_28")]
psych::alpha(EFC_alpha)

Reliability analysis   
Call: psych::alpha(x = EFC_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean  sd median_r
      0.79      0.79    0.84      0.24 3.7 0.017  2.1 0.5     0.21

    95% confidence boundaries 
         lower alpha upper
Feldt     0.75  0.79  0.82
Duhachek  0.75  0.79  0.82

 Reliability if an item is dropped:
           raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
T1_COPE_5       0.77      0.77    0.82      0.24 3.4    0.019 0.019  0.21
T1_COPE_9       0.77      0.77    0.83      0.24 3.4    0.019 0.023  0.20
T1_COPE_13      0.78      0.78    0.83      0.24 3.5    0.018 0.020  0.22
T1_COPE_15      0.76      0.76    0.81      0.23 3.2    0.019 0.020  0.21
T1_COPE_18      0.77      0.77    0.81      0.24 3.4    0.019 0.018  0.21
T1_COPE_20      0.77      0.77    0.82      0.23 3.3    0.019 0.021  0.21
T1_COPE_21      0.76      0.76    0.82      0.23 3.2    0.019 0.021  0.20
T1_COPE_22      0.78      0.78    0.82      0.25 3.6    0.018 0.017  0.22
T1_COPE_24      0.77      0.77    0.82      0.23 3.4    0.019 0.021  0.21
T1_COPE_26      0.77      0.78    0.82      0.24 3.4    0.018 0.022  0.21
T1_COPE_27      0.78      0.78    0.82      0.24 3.6    0.018 0.018  0.22
T1_COPE_28      0.77      0.78    0.81      0.24 3.5    0.018 0.018  0.22

 Item statistics 
             n raw.r std.r r.cor r.drop mean   sd
T1_COPE_5  329  0.55  0.56  0.51   0.44  2.2 0.89
T1_COPE_9  329  0.54  0.56  0.48   0.44  1.8 0.81
T1_COPE_13 329  0.49  0.49  0.43   0.36  2.2 0.94
T1_COPE_15 329  0.63  0.63  0.59   0.52  2.3 0.95
T1_COPE_18 329  0.57  0.56  0.54   0.44  2.2 0.97
T1_COPE_20 329  0.58  0.58  0.53   0.46  2.8 0.93
T1_COPE_21 329  0.63  0.63  0.58   0.53  2.2 0.87
T1_COPE_22 329  0.45  0.45  0.41   0.32  1.6 0.93
T1_COPE_24 329  0.57  0.57  0.52   0.46  2.7 0.90
T1_COPE_26 329  0.54  0.54  0.48   0.41  1.9 0.92
T1_COPE_27 329  0.49  0.49  0.45   0.36  1.6 0.91
T1_COPE_28 329  0.54  0.52  0.50   0.41  1.9 0.95

Non missing response frequency for each item
              1    2    3    4 miss
T1_COPE_5  0.21 0.44 0.26 0.09 0.02
T1_COPE_9  0.43 0.38 0.17 0.02 0.02
T1_COPE_13 0.24 0.40 0.26 0.11 0.02
T1_COPE_15 0.23 0.35 0.30 0.11 0.02
T1_COPE_18 0.26 0.37 0.25 0.12 0.02
T1_COPE_20 0.10 0.27 0.39 0.24 0.02
T1_COPE_21 0.23 0.43 0.27 0.07 0.02
T1_COPE_22 0.66 0.18 0.09 0.08 0.02
T1_COPE_24 0.09 0.31 0.38 0.22 0.02
T1_COPE_26 0.42 0.35 0.16 0.07 0.02
T1_COPE_27 0.61 0.23 0.09 0.07 0.02
T1_COPE_28 0.44 0.32 0.16 0.08 0.02
Code
AVO_alpha <- df[, c("T1_COPE_1", "T1_COPE_3", "T1_COPE_4", "T1_COPE_6", "T1_COPE_8", "T1_COPE_11", "T1_COPE_16", "T1_COPE_19")]
psych::alpha(AVO_alpha)

Reliability analysis   
Call: psych::alpha(x = AVO_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.68      0.71    0.77      0.23 2.4 0.027  1.7 0.41     0.19

    95% confidence boundaries 
         lower alpha upper
Feldt     0.62  0.68  0.73
Duhachek  0.62  0.68  0.73

 Reliability if an item is dropped:
           raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
T1_COPE_1       0.69      0.72    0.78      0.27 2.6    0.026 0.034  0.21
T1_COPE_3       0.65      0.69    0.74      0.24 2.2    0.029 0.032  0.19
T1_COPE_4       0.63      0.66    0.67      0.21 1.9    0.031 0.018  0.19
T1_COPE_6       0.65      0.69    0.75      0.24 2.2    0.030 0.037  0.20
T1_COPE_8       0.63      0.66    0.72      0.22 2.0    0.031 0.032  0.18
T1_COPE_11      0.63      0.66    0.67      0.22 1.9    0.031 0.019  0.19
T1_COPE_16      0.63      0.66    0.73      0.22 2.0    0.032 0.036  0.19
T1_COPE_19      0.67      0.71    0.77      0.26 2.4    0.028 0.037  0.20

 Item statistics 
             n raw.r std.r r.cor r.drop mean   sd
T1_COPE_1  329  0.50  0.42  0.26   0.24  2.4 0.95
T1_COPE_3  329  0.51  0.54  0.46   0.34  1.3 0.64
T1_COPE_4  329  0.59  0.66  0.69   0.45  1.3 0.60
T1_COPE_6  329  0.57  0.55  0.45   0.37  1.6 0.79
T1_COPE_8  329  0.61  0.65  0.59   0.46  1.3 0.68
T1_COPE_11 329  0.59  0.66  0.69   0.46  1.2 0.56
T1_COPE_16 329  0.62  0.64  0.56   0.47  1.4 0.66
T1_COPE_19 329  0.56  0.47  0.33   0.31  2.7 0.97

Non missing response frequency for each item
              1    2    3    4 miss
T1_COPE_1  0.20 0.35 0.31 0.13 0.02
T1_COPE_3  0.74 0.20 0.05 0.02 0.02
T1_COPE_4  0.78 0.16 0.06 0.01 0.02
T1_COPE_6  0.55 0.31 0.11 0.03 0.02
T1_COPE_8  0.75 0.18 0.05 0.02 0.02
T1_COPE_11 0.83 0.12 0.04 0.01 0.02
T1_COPE_16 0.71 0.21 0.06 0.01 0.02
T1_COPE_19 0.12 0.26 0.37 0.25 0.02
Code
#CFS
# Define all relevant column names explicitly for Evaluation
Evaluation_alpha <- df[, c("T1_CFS_2_R", "T1_CFS_6", "T1_CFS_7_R", "T1_CFS_8", "T1_CFS_9")]
psych::alpha(Evaluation_alpha)
Warning in psych::alpha(Evaluation_alpha): Some items were negatively correlated with the first principal component and probably 
should be reversed.  
To do this, run the function again with the 'check.keys=TRUE' option
Some items ( T1_CFS_2_R ) were negatively correlated with the first principal component and 
probably should be reversed.  
To do this, run the function again with the 'check.keys=TRUE' option

Reliability analysis   
Call: psych::alpha(x = Evaluation_alpha)

  raw_alpha std.alpha G6(smc) average_r  S/N   ase mean   sd median_r
      0.46      0.46    0.53      0.14 0.84 0.047  1.7 0.51     0.13

    95% confidence boundaries 
         lower alpha upper
Feldt     0.36  0.46  0.54
Duhachek  0.36  0.46  0.55

 Reliability if an item is dropped:
           raw_alpha std.alpha G6(smc) average_r  S/N alpha se var.r med.r
T1_CFS_2_R      0.57      0.58    0.57     0.258 1.39    0.038 0.046 0.241
T1_CFS_6        0.31      0.31    0.40     0.100 0.44    0.062 0.072 0.064
T1_CFS_7_R      0.43      0.43    0.51     0.158 0.75    0.049 0.107 0.174
T1_CFS_8        0.41      0.41    0.43     0.148 0.70    0.053 0.040 0.131
T1_CFS_9        0.18      0.18    0.25     0.052 0.22    0.074 0.053 0.070

 Item statistics 
             n raw.r std.r r.cor r.drop mean   sd
T1_CFS_2_R 127  0.31  0.31 0.033 -0.039  1.7 0.80
T1_CFS_6   329  0.68  0.65 0.537  0.371  1.8 0.75
T1_CFS_7_R 329  0.50  0.53 0.286  0.199  2.2 0.86
T1_CFS_8   329  0.63  0.55 0.441  0.222  1.3 0.82
T1_CFS_9   329  0.78  0.76 0.749  0.512  1.4 0.86

Non missing response frequency for each item
              0    1    2    3 miss
T1_CFS_2_R 0.08 0.30 0.50 0.13 0.62
T1_CFS_6   0.04 0.30 0.50 0.16 0.02
T1_CFS_7_R 0.05 0.15 0.36 0.44 0.02
T1_CFS_8   0.15 0.45 0.33 0.07 0.02
T1_CFS_9   0.16 0.38 0.37 0.09 0.02
Code
Evaluation_new_alpha <- df[, c("T1_CFS_6", "T1_CFS_8", "T1_CFS_9")]
psych::alpha(Evaluation_new_alpha)

Reliability analysis   
Call: psych::alpha(x = Evaluation_new_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
       0.7       0.7    0.62      0.44 2.3 0.028  1.5 0.64     0.47

    95% confidence boundaries 
         lower alpha upper
Feldt     0.64   0.7  0.75
Duhachek  0.65   0.7  0.76

 Reliability if an item is dropped:
         raw_alpha std.alpha G6(smc) average_r  S/N alpha se var.r med.r
T1_CFS_6      0.69      0.69    0.52      0.52 2.19    0.034    NA  0.52
T1_CFS_8      0.64      0.64    0.47      0.47 1.78    0.039    NA  0.47
T1_CFS_9      0.48      0.48    0.32      0.32 0.93    0.056    NA  0.32

 Item statistics 
           n raw.r std.r r.cor r.drop mean   sd
T1_CFS_6 329  0.74  0.75  0.54   0.45  1.8 0.75
T1_CFS_8 329  0.78  0.78  0.60   0.50  1.3 0.82
T1_CFS_9 329  0.85  0.84  0.73   0.61  1.4 0.86

Non missing response frequency for each item
            0    1    2    3 miss
T1_CFS_6 0.04 0.30 0.50 0.16 0.02
T1_CFS_8 0.15 0.45 0.33 0.07 0.02
T1_CFS_9 0.16 0.38 0.37 0.09 0.02
Code
Adaptive_alpha <- df[, c("T1_CFS_1", "T1_CFS_3", "T1_CFS_4", "T1_CFS_5", "T1_CFS_10")]
psych::alpha(Adaptive_alpha)

Reliability analysis   
Call: psych::alpha(x = Adaptive_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean  sd median_r
      0.86      0.86    0.84      0.55 6.1 0.012  1.6 0.6     0.54

    95% confidence boundaries 
         lower alpha upper
Feldt     0.83  0.86  0.88
Duhachek  0.83  0.86  0.88

 Reliability if an item is dropped:
          raw_alpha std.alpha G6(smc) average_r S/N alpha se  var.r med.r
T1_CFS_1       0.84      0.84    0.81      0.56 5.2    0.015 0.0120  0.55
T1_CFS_3       0.84      0.84    0.81      0.56 5.1    0.015 0.0097  0.54
T1_CFS_4       0.82      0.82    0.78      0.53 4.5    0.016 0.0054  0.55
T1_CFS_5       0.80      0.80    0.76      0.50 4.0    0.018 0.0029  0.52
T1_CFS_10      0.85      0.85    0.82      0.59 5.7    0.013 0.0068  0.55

 Item statistics 
            n raw.r std.r r.cor r.drop mean   sd
T1_CFS_1  329  0.77  0.78  0.69   0.64  1.7 0.72
T1_CFS_3  329  0.78  0.78  0.70   0.64  1.7 0.74
T1_CFS_4  329  0.83  0.83  0.79   0.72  1.5 0.77
T1_CFS_5  329  0.87  0.87  0.85   0.78  1.6 0.75
T1_CFS_10 329  0.75  0.74  0.64   0.59  1.5 0.77

Non missing response frequency for each item
             0    1    2    3 miss
T1_CFS_1  0.03 0.33 0.51 0.12 0.02
T1_CFS_3  0.04 0.33 0.50 0.13 0.02
T1_CFS_4  0.08 0.38 0.44 0.09 0.02
T1_CFS_5  0.06 0.40 0.44 0.10 0.02
T1_CFS_10 0.09 0.42 0.41 0.09 0.02
Code
#BAT12
T2_BAT12_Exhaustion_alpha <- df[, c("T2_Burnout_Q1", "T2_Burnout_Q2", "T2_Burnout_Q3")]
psych::alpha(T2_BAT12_Exhaustion_alpha)

Reliability analysis   
Call: psych::alpha(x = T2_BAT12_Exhaustion_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.83      0.83    0.77      0.63   5 0.016  2.9 0.88     0.63

    95% confidence boundaries 
         lower alpha upper
Feldt      0.8  0.83  0.86
Duhachek   0.8  0.83  0.86

 Reliability if an item is dropped:
              raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
T2_Burnout_Q1      0.74      0.74    0.59      0.59 2.9    0.028    NA  0.59
T2_Burnout_Q2      0.77      0.77    0.63      0.63 3.4    0.025    NA  0.63
T2_Burnout_Q3      0.79      0.79    0.66      0.66 3.8    0.022    NA  0.66

 Item statistics 
                n raw.r std.r r.cor r.drop mean   sd
T2_Burnout_Q1 242  0.88  0.88  0.79   0.72  3.0 0.98
T2_Burnout_Q2 242  0.87  0.87  0.76   0.69  3.0 1.03
T2_Burnout_Q3 242  0.86  0.86  0.73   0.67  2.7 1.03

Non missing response frequency for each item
                 1    2    3    4    5 miss
T2_Burnout_Q1 0.08 0.19 0.39 0.31 0.04 0.28
T2_Burnout_Q2 0.09 0.22 0.40 0.21 0.07 0.28
T2_Burnout_Q3 0.14 0.32 0.31 0.20 0.02 0.28
Code
T2_BAT12_MentalDistance_alpha <- df[, c("T2_Burnout_Q7", "T2_Burnout_Q8", "T2_Burnout_Q9")]
psych::alpha(T2_BAT12_MentalDistance_alpha)

Reliability analysis   
Call: psych::alpha(x = T2_BAT12_MentalDistance_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.88      0.88    0.85       0.7 7.1 0.012  2.6 0.93     0.63

    95% confidence boundaries 
         lower alpha upper
Feldt     0.85  0.88   0.9
Duhachek  0.86  0.88   0.9

 Reliability if an item is dropped:
              raw_alpha std.alpha G6(smc) average_r  S/N alpha se var.r med.r
T2_Burnout_Q7      0.76      0.76    0.62      0.62  3.2   0.0257    NA  0.62
T2_Burnout_Q8      0.77      0.77    0.63      0.63  3.3   0.0251    NA  0.63
T2_Burnout_Q9      0.93      0.93    0.87      0.87 13.2   0.0077    NA  0.87

 Item statistics 
                n raw.r std.r r.cor r.drop mean   sd
T2_Burnout_Q7 242  0.93  0.93  0.91   0.83  2.7 1.06
T2_Burnout_Q8 242  0.93  0.93  0.91   0.83  2.8 1.05
T2_Burnout_Q9 242  0.83  0.83  0.67   0.64  2.3 0.98

Non missing response frequency for each item
                 1    2    3    4    5 miss
T2_Burnout_Q7 0.13 0.27 0.38 0.16 0.06 0.28
T2_Burnout_Q8 0.12 0.26 0.39 0.18 0.05 0.28
T2_Burnout_Q9 0.21 0.43 0.24 0.10 0.02 0.28
Code
T2_BAT12_Cognitive_alpha <- df[, c("T2_Burnout_Q7", "T2_Burnout_Q8", "T2_Burnout_Q9")]
psych::alpha(T2_BAT12_Cognitive_alpha)

Reliability analysis   
Call: psych::alpha(x = T2_BAT12_Cognitive_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.88      0.88    0.85       0.7 7.1 0.012  2.6 0.93     0.63

    95% confidence boundaries 
         lower alpha upper
Feldt     0.85  0.88   0.9
Duhachek  0.86  0.88   0.9

 Reliability if an item is dropped:
              raw_alpha std.alpha G6(smc) average_r  S/N alpha se var.r med.r
T2_Burnout_Q7      0.76      0.76    0.62      0.62  3.2   0.0257    NA  0.62
T2_Burnout_Q8      0.77      0.77    0.63      0.63  3.3   0.0251    NA  0.63
T2_Burnout_Q9      0.93      0.93    0.87      0.87 13.2   0.0077    NA  0.87

 Item statistics 
                n raw.r std.r r.cor r.drop mean   sd
T2_Burnout_Q7 242  0.93  0.93  0.91   0.83  2.7 1.06
T2_Burnout_Q8 242  0.93  0.93  0.91   0.83  2.8 1.05
T2_Burnout_Q9 242  0.83  0.83  0.67   0.64  2.3 0.98

Non missing response frequency for each item
                 1    2    3    4    5 miss
T2_Burnout_Q7 0.13 0.27 0.38 0.16 0.06 0.28
T2_Burnout_Q8 0.12 0.26 0.39 0.18 0.05 0.28
T2_Burnout_Q9 0.21 0.43 0.24 0.10 0.02 0.28
Code
T2_BAT12_Emotion_alpha <- df[, c("T2_Burnout_Q10", "T2_Burnout_Q11", "T2_Burnout_Q12")]
psych::alpha(T2_BAT12_Emotion_alpha)

Reliability analysis   
Call: psych::alpha(x = T2_BAT12_Emotion_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.85      0.85     0.8      0.65 5.6 0.014  1.8 0.83     0.63

    95% confidence boundaries 
         lower alpha upper
Feldt     0.82  0.85  0.88
Duhachek  0.82  0.85  0.88

 Reliability if an item is dropped:
               raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
T2_Burnout_Q10      0.74      0.74    0.59      0.59 2.9    0.028    NA  0.59
T2_Burnout_Q11      0.85      0.85    0.74      0.74 5.7    0.016    NA  0.74
T2_Burnout_Q12      0.77      0.77    0.63      0.63 3.4    0.025    NA  0.63

 Item statistics 
                 n raw.r std.r r.cor r.drop mean   sd
T2_Burnout_Q10 242  0.90  0.90  0.84   0.77  1.9 0.95
T2_Burnout_Q11 242  0.84  0.84  0.70   0.65  1.7 0.92
T2_Burnout_Q12 242  0.89  0.89  0.81   0.74  1.8 0.98

Non missing response frequency for each item
                  1    2    3    4    5 miss
T2_Burnout_Q10 0.43 0.35 0.14 0.06 0.01 0.28
T2_Burnout_Q11 0.58 0.24 0.12 0.06 0.00 0.28
T2_Burnout_Q12 0.53 0.24 0.17 0.05 0.01 0.28
Code
#PSS4
T1_PSS4_alpha <- df[, c("T1_PSS4_Q1", "T1_PSS4_Q2_R", "T1_PSS4_Q3_R", "T1_PSS4_Q4")]
psych::alpha(T1_PSS4_alpha)

Reliability analysis   
Call: psych::alpha(x = T1_PSS4_alpha)

  raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
      0.63      0.63    0.67       0.3 1.7 0.034  1.7 0.71     0.16

    95% confidence boundaries 
         lower alpha upper
Feldt     0.56  0.63  0.69
Duhachek  0.57  0.63  0.70

 Reliability if an item is dropped:
             raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
T1_PSS4_Q1        0.55      0.56    0.55      0.30 1.3    0.044 0.083  0.16
T1_PSS4_Q2_R      0.56      0.55    0.52      0.29 1.2    0.042 0.070  0.16
T1_PSS4_Q3_R      0.57      0.57    0.53      0.30 1.3    0.041 0.061  0.16
T1_PSS4_Q4        0.58      0.58    0.56      0.32 1.4    0.041 0.072  0.16

 Item statistics 
               n raw.r std.r r.cor r.drop mean   sd
T1_PSS4_Q1   337  0.70  0.69  0.56   0.43  1.6 1.04
T1_PSS4_Q2_R 337  0.70  0.71  0.60   0.42  1.6 1.04
T1_PSS4_Q3_R 337  0.67  0.69  0.57   0.40  1.9 0.96
T1_PSS4_Q4   337  0.69  0.67  0.53   0.39  1.6 1.08

Non missing response frequency for each item
                0    1    2    3    4 miss
T1_PSS4_Q1   0.15 0.28 0.39 0.15 0.04    0
T1_PSS4_Q2_R 0.14 0.37 0.32 0.12 0.05    0
T1_PSS4_Q3_R 0.06 0.30 0.43 0.14 0.07    0
T1_PSS4_Q4   0.16 0.29 0.34 0.16 0.05    0
Code
vars <- c("T1_CFS_Evaluation_new", "T1_CFS_Adaptive", "T1_AdaptabilityScale", "T1_BAT12_Cognitive", "T1_BAT12_Exhaustion")
df_subset <- df[, vars]

cor_matrix <- cor(df_subset, use = "complete.obs")
print(cor_matrix)
                      T1_CFS_Evaluation_new T1_CFS_Adaptive
T1_CFS_Evaluation_new            1.00000000      0.64637791
T1_CFS_Adaptive                  0.64637791      1.00000000
T1_AdaptabilityScale             0.40856682      0.39982262
T1_BAT12_Cognitive              -0.07334822     -0.05493332
T1_BAT12_Exhaustion             -0.09710609     -0.01502391
                      T1_AdaptabilityScale T1_BAT12_Cognitive
T1_CFS_Evaluation_new            0.4085668        -0.07334822
T1_CFS_Adaptive                  0.3998226        -0.05493332
T1_AdaptabilityScale             1.0000000        -0.29570030
T1_BAT12_Cognitive              -0.2957003         1.00000000
T1_BAT12_Exhaustion             -0.3715366         0.55641347
                      T1_BAT12_Exhaustion
T1_CFS_Evaluation_new         -0.09710609
T1_CFS_Adaptive               -0.01502391
T1_AdaptabilityScale          -0.37153655
T1_BAT12_Cognitive             0.55641347
T1_BAT12_Exhaustion            1.00000000

5 MI regressions

Regressions were run with key outcomes and a T2 Complete data variable to explore the influential variables that would inform the multiple imputation.

Code
#MI models

#Following initial checks from the MI models, outliers align with the complete case outliers. 
#Create a new dataset with the three removed for the MI 
# df <- df[!(df$PID %in% c("1269", "1231", "2001")), ]
# nrow(df) #less 3
# write_xlsx(df, "~/Clin PhD/Research Project/Study. 3 Quantitative Study ER flex/Data/Dataset_clean+scored_MIExcl_100725.xlsx")
# 
# df <- read_excel("~/Clin PhD/Research Project/Study. 3 Quantitative Study ER flex/Data/Dataset_clean+scored_MIExcl_100725.xlsx")
# #from df, AFTER 3x influential PIDs were exlcuded based on assumption checks from MI models
# 
# 
# MImodel_T2complete <- glm(T2_CompleteMI ~ Age_2024 + T1_COBAustralia + T1_Gender_MW + T1_Handedness +
#                          Ethnicity_White + Ethnicity_AsianPI + Ethnicity_BlackOther +
#                          T1_Income_ord + T1_EducationMI + T1_EmploymentMI + 
#                          T1_MentalHealth + T1_PHQ2 + T1_GAD7 + T1_PSS4 + T1_Loneliness + T1_Sleep_quality_1 +
#                          T1_Physical_Health + T1_Phys_activity + T1_Varied_DietQ +
#                          WorkAbs_Q1_1 + T1_UWES3 + T1_HPQ_Satisfaction + T1_IWPQ_TP + 
#                          T1_IWPQ_CP + T1_IWPQ_CB + T1_WorkplaceStress + T1_REQ + T1_ADNM8_A +
#                          T1_CDRISC2 + T1_WEMWBS + T1_PERS18_GenPos + T1_PERS18_GenNeg +
#                          T1_LET6 + T1_Gratitude + T1_AdaptabilityScale + T1_ADEXI_Inhib +
#                          T1_ADEXI_WM + T1_GPS9 + T1_UPPS_overall_average + T1_IUS +
#                          T1_Fatigue_PF + T1_Fatigue_MF + T1_HAAS_high_positive + T1_HAAS_low_positive +
#                          T1_HAAS_high_negative + T1_HAAS_low_negative + T1_TIPI_Conscientiousness +
#                          T1_TIPI_Extraversion + T1_TIPI_Agreeableness + T1_TIPI_EmotionalStability +
#                          T1_Binge_Freq_MI + T1_HWQProd +
#                          T1_COPE_SelfDistraction + T1_COPE_ActiveCoping + T1_COPE_Denial +        # predictors
#                          T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport +
#                          T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting +
#                          T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing +
#                          T1_COPE_SelfBlame + T1_COPE_Planning + T1_COPE_Humor +
#                          T1_COPE_Acceptance + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1,
#                          family = binomial, data = df) 
# summary(MImodel_T2complete)
# 
# MImodel_BAT12Cog <- lm(T2_BAT12_Cognitive ~ Age_2024 + T1_COBAustralia + T1_Gender_MW + T1_Handedness +
#                          Ethnicity_White + Ethnicity_AsianPI + Ethnicity_BlackOther +
#                          T1_Income_ord + T1_EducationMI + T1_EmploymentMI + 
#                          T1_MentalHealth + T1_PHQ2 + T1_GAD7 + T1_PSS4 + T1_Loneliness + T1_Sleep_quality_1 +
#                          T1_Physical_Health + T1_Phys_activity + T1_Varied_DietQ +
#                          WorkAbs_Q1_1 + T1_UWES3 + T1_HPQ_Satisfaction + T1_IWPQ_TP + 
#                          T1_IWPQ_CP + T1_IWPQ_CB + T1_WorkplaceStress + T1_REQ + T1_ADNM8_A +
#                          T1_CDRISC2 + T1_WEMWBS + T1_PERS18_GenPos + T1_PERS18_GenNeg +
#                          T1_LET6 + T1_Gratitude + T1_AdaptabilityScale + T1_ADEXI_Inhib +
#                          T1_ADEXI_WM + T1_GPS9 + T1_UPPS_overall_average + T1_IUS +
#                          T1_Fatigue_PF + T1_Fatigue_MF + T1_HAAS_high_positive + T1_HAAS_low_positive +
#                          T1_HAAS_high_negative + T1_HAAS_low_negative + T1_TIPI_Conscientiousness +
#                          T1_TIPI_Extraversion + T1_TIPI_Agreeableness + T1_TIPI_EmotionalStability +
#                          T1_Binge_Freq_MI + T1_HWQProd +
#                          T1_COPE_SelfDistraction + T1_COPE_ActiveCoping + T1_COPE_Denial +        
#                          T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport +
#                          T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting +
#                          T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing +
#                          T1_COPE_SelfBlame + T1_COPE_Planning + T1_COPE_Humor +
#                          T1_COPE_Acceptance + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1,
#                        data = df)
# summary(MImodel_BAT12Cog)
# 
# 
# MImodel_BAT12Emo <- lm(T2_BAT12_Emotion ~ Age_2024 + T1_COBAustralia + T1_Gender_MW + T1_Handedness +
#                          Ethnicity_White + Ethnicity_AsianPI + Ethnicity_BlackOther +
#                          T1_Income_ord + T1_EducationMI + T1_EmploymentMI + 
#                          T1_MentalHealth + T1_PHQ2 + T1_GAD7 + T1_PSS4 + T1_Loneliness + T1_Sleep_quality_1 +
#                          T1_Physical_Health + T1_Phys_activity + T1_Varied_DietQ +
#                          WorkAbs_Q1_1 + T1_UWES3 + T1_HPQ_Satisfaction + T1_IWPQ_TP + 
#                          T1_IWPQ_CP + T1_IWPQ_CB + T1_WorkplaceStress + T1_REQ + T1_ADNM8_A +
#                          T1_CDRISC2 + T1_WEMWBS + T1_PERS18_GenPos + T1_PERS18_GenNeg +
#                          T1_LET6 + T1_Gratitude + T1_AdaptabilityScale + T1_ADEXI_Inhib +
#                          T1_ADEXI_WM + T1_GPS9 + T1_UPPS_overall_average + T1_IUS +
#                          T1_Fatigue_PF + T1_Fatigue_MF + T1_HAAS_high_positive + T1_HAAS_low_positive +
#                          T1_HAAS_high_negative + T1_HAAS_low_negative + T1_TIPI_Conscientiousness +
#                          T1_TIPI_Extraversion + T1_TIPI_Agreeableness + T1_TIPI_EmotionalStability +
#                          T1_Binge_Freq_MI + T1_HWQProd +
#                          T1_COPE_SelfDistraction + T1_COPE_ActiveCoping + T1_COPE_Denial +        
#                          T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport +
#                          T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting +
#                          T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing +
#                          T1_COPE_SelfBlame + T1_COPE_Planning + T1_COPE_Humor +
#                          T1_COPE_Acceptance + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1,
#                        data = df)
# summary(MImodel_BAT12Emo)
# 
# 
# MImodel_BAT12Ment <- lm(T2_BAT12_MentalDistance ~ Age_2024 + T1_COBAustralia + T1_Gender_MW + T1_Handedness +
#                           Ethnicity_White + Ethnicity_AsianPI + Ethnicity_BlackOther +
#                           T1_Income_ord + T1_EducationMI + T1_EmploymentMI + 
#                           T1_MentalHealth + T1_PHQ2 + T1_GAD7 + T1_PSS4 + T1_Loneliness + T1_Sleep_quality_1 +
#                           T1_Physical_Health + T1_Phys_activity + T1_Varied_DietQ +
#                           WorkAbs_Q1_1 + T1_UWES3 + T1_HPQ_Satisfaction + T1_IWPQ_TP + 
#                           T1_IWPQ_CP + T1_IWPQ_CB + T1_WorkplaceStress + T1_REQ + T1_ADNM8_A +
#                           T1_CDRISC2 + T1_WEMWBS + T1_PERS18_GenPos + T1_PERS18_GenNeg +
#                           T1_LET6 + T1_Gratitude + T1_AdaptabilityScale + T1_ADEXI_Inhib +
#                           T1_ADEXI_WM + T1_GPS9 + T1_UPPS_overall_average + T1_IUS +
#                           T1_Fatigue_PF + T1_Fatigue_MF + T1_HAAS_high_positive + T1_HAAS_low_positive +
#                           T1_HAAS_high_negative + T1_HAAS_low_negative + T1_TIPI_Conscientiousness +
#                           T1_TIPI_Extraversion + T1_TIPI_Agreeableness + T1_TIPI_EmotionalStability +
#                           T1_Binge_Freq_MI + T1_HWQProd +
#                           T1_COPE_SelfDistraction + T1_COPE_ActiveCoping + T1_COPE_Denial +        
#                           T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport +
#                           T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting +
#                           T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing +
#                           T1_COPE_SelfBlame + T1_COPE_Planning + T1_COPE_Humor +
#                           T1_COPE_Acceptance + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1,
#                         data = df)
# summary(MImodel_BAT12Ment)
# 
# MImodel_BAT12Exh <- lm(T2_BAT12_Exhaustion ~ Age_2024 + T1_COBAustralia + T1_Gender_MW + T1_Handedness +
#                          Ethnicity_White + Ethnicity_AsianPI + Ethnicity_BlackOther +
#                          T1_Income_ord + T1_EducationMI + T1_EmploymentMI + 
#                          T1_MentalHealth + T1_PHQ2 + T1_GAD7 + T1_PSS4 + T1_Loneliness + T1_Sleep_quality_1 +
#                          T1_Physical_Health + T1_Phys_activity + T1_Varied_DietQ +
#                          WorkAbs_Q1_1 + T1_UWES3 + T1_HPQ_Satisfaction + T1_IWPQ_TP + 
#                          T1_IWPQ_CP + T1_IWPQ_CB + T1_WorkplaceStress + T1_REQ + T1_ADNM8_A +
#                          T1_CDRISC2 + T1_WEMWBS + T1_PERS18_GenPos + T1_PERS18_GenNeg +
#                          T1_LET6 + T1_Gratitude + T1_AdaptabilityScale + T1_ADEXI_Inhib +
#                          T1_ADEXI_WM + T1_GPS9 + T1_UPPS_overall_average + T1_IUS +
#                          T1_Fatigue_PF + T1_Fatigue_MF + T1_HAAS_high_positive + T1_HAAS_low_positive +
#                          T1_HAAS_high_negative + T1_HAAS_low_negative + T1_TIPI_Conscientiousness +
#                          T1_TIPI_Extraversion + T1_TIPI_Agreeableness + T1_TIPI_EmotionalStability +
#                          T1_Binge_Freq_MI + T1_HWQProd +
#                          T1_COPE_SelfDistraction + T1_COPE_ActiveCoping + T1_COPE_Denial +        
#                          T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport +
#                          T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting +
#                          T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing +
#                          T1_COPE_SelfBlame + T1_COPE_Planning + T1_COPE_Humor +
#                          T1_COPE_Acceptance + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1,
#                        data = df)
# summary(MImodel_BAT12Exh)
# 
# table(df$T1_Education)
# Select variables for imputation based on your list

# # vars_for_MI <- c(
#   "T1_PHQ2",
#   "T2_PHQ2",
#   "T1_UWES3", 
#   "T2_UWES3",
#   "T1_WorkplaceStress",
#   "T2_WorkplaceStress",
#   "T1_Fatigue_PF", 
#   "T2_Fatigue_PF",
#   "T1_PSS4",
#   "T2_PSS4",
#   "Age_2024",
#   "T1_Gender_MW",
#   "T1_EducationMI",
#   "T1_CFS_Adaptive",
#   "T2_CFS_Adaptive",
#   "T1_CFS_Evaluation_new",
#   "T2_CFS_Evaluation_new",
#   "CST_switchcost.1",
#   "CST_switchcost.2",
#   "T2_BAT12_Cognitive",
#   "T2_BAT12_Emotion",
#   "T2_BAT12_MentalDistance",
#   "T2_BAT12_Exhaustion",
#   "T1_BAT12_Cognitive",
#   "T1_BAT12_Emotion",
#   "T1_BAT12_MentalDistance",
#   "T1_BAT12_Exhaustion",
#   "T1_COPE_SubstanceUse",
#   "T1_COPE_Venting",
#   "T1_COPE_UseOfInstrumentalSupport",
#   "T1_COPE_BehavioralDisengagement",
#   "T1_COPE_SelfDistraction",
#   "T1_COPE_ActiveCoping",
#   "T1_COPE_Denial",
#   "T1_COPE_UseOfEmotionalSupport",
#   "T1_COPE_Religion",
#   "T1_COPE_PositiveReframing",
#   "T1_COPE_SelfBlame",
#   "T1_COPE_Planning",
#   "T1_COPE_Humor",
#   "T1_COPE_Acceptance",
#   "T2_COPE_2wk_1", "T2_COPE_2wk_2", "T2_COPE_2wk_3", "T2_COPE_2wk_4", "T2_COPE_2wk_5",
#   "T2_COPE_2wk_6", "T2_COPE_2wk_7", "T2_COPE_2wk_8", "T2_COPE_2wk_9", "T2_COPE_2wk_10",
#   "T2_COPE_2wk_11", "T2_COPE_2wk_12", "T2_COPE_2wk_13", "T2_COPE_2wk_14", "T2_COPE_2wk_15",
#   "T2_COPE_2wk_16", "T2_COPE_2wk_17", "T2_COPE_2wk_18", "T2_COPE_2wk_19", "T2_COPE_2wk_20",
#   "T2_COPE_2wk_21", "T2_COPE_2wk_22", "T2_COPE_2wk_23", "T2_COPE_2wk_24", "T2_COPE_2wk_25",
#   "T2_COPE_2wk_26", "T2_COPE_2wk_27", "T2_COPE_2wk_28"
# )

# Subset the data
# df_MIsubset <- df[, vars_for_MI]

# Run mice using the custom method vector
# imp <- mice(df_MIsubset, m = 20, method = 'pmm', maxit = 50, seed = 129)
# saveRDS(imp, "imp_090725_83.rds")

imp <- readRDS("imp_090725_83.rds")


# Check the imputation summary
# MI_df <- complete(imp, action = "long", include = TRUE)

6 Check MI convergence and diagnostics

Code
imp <- readRDS("imp_090725_83.rds")
plot(imp)               # Trace lines across imputations — should mix well

Code
plot(imp, y = "T1_CFS_Adaptive")

Code
densityplot(imp, ~ T2_BAT12_Cognitive)

Code
densityplot(imp, ~ T2_BAT12_Exhaustion)  #

Code
densityplot(imp, ~ T2_BAT12_Emotion) 

Code
densityplot(imp, ~ T2_BAT12_MentalDistance) #

Code
densityplot(imp, ~ T1_CFS_Adaptive)

Code
densityplot(imp, ~ T1_CFS_Evaluation_new)

Code
densityplot(imp, ~ CST_switchcost.1)

Code
densityplot(imp, ~ T1_COPE_BehavioralDisengagement)

Code
densityplot(imp, ~ T1_COPE_SelfDistraction)

Code
densityplot(imp, ~ T1_COPE_Planning)

Code
densityplot(imp, ~ T1_COPE_Venting)

Code
densityplot(imp, ~ T1_COPE_UseOfInstrumentalSupport)

Code
densityplot(imp, ~ T1_COPE_Humor)

Code
densityplot(imp, ~ T1_COPE_Acceptance)

Code
# Store plots in a list
p1 <- densityplot(imp, ~ T2_BAT12_Cognitive)
p2 <- densityplot(imp, ~ T2_BAT12_Exhaustion)
p3 <- densityplot(imp, ~ T2_BAT12_Emotion)
p4 <- densityplot(imp, ~ T2_BAT12_MentalDistance)
p5 <- densityplot(imp, ~ T1_CFS_Adaptive)
p6 <- densityplot(imp, ~ T1_CFS_Evaluation_new)
p7 <- densityplot(imp, ~ CST_switchcost.1)
p8 <- densityplot(imp, ~ T1_COPE_BehavioralDisengagement)
p9 <- densityplot(imp, ~ T1_COPE_SelfDistraction)
p10 <- densityplot(imp, ~ T1_COPE_Planning)
p11 <- densityplot(imp, ~ T1_COPE_Venting)
p12 <- densityplot(imp, ~ T1_COPE_UseOfInstrumentalSupport)
p13 <- densityplot(imp, ~ T1_COPE_Humor)
p14 <- densityplot(imp, ~ T1_COPE_Acceptance)

# pdf("imp_090725_80_all_densityplots.pdf", width = 8, height = 6)
print(p1)

Code
print(p2)

Code
print(p3)

Code
print(p4)

Code
print(p5)

Code
print(p6)

Code
print(p7)

Code
print(p8)

Code
print(p9)

Code
print(p10)

Code
print(p11)

Code
print(p12)

Code
print(p13)

Code
print(p14)

Code
dev.off()
null device 
          1 

7 Complete Case Analysis

Code
length(unique(df_CC$PID))  # Number of unique participants
[1] 235
Code
#Model A - Covariates
# BAT12Cog_model_A_Cov <- lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_CC)
BAT12Cog_model_A_Cov <- readRDS("BAT12Cog_model_A_Cov_final.RDS")
summary(BAT12Cog_model_A_Cov)

Call:
lm(formula = T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_CC)

Residuals:
   Min     1Q Median     3Q    Max 
-5.036 -1.337 -0.187  1.257  5.478 

Coefficients:
                                     Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          2.099267   0.908922   2.310   0.0218 *  
T1_BAT12_Cognitive                   0.566175   0.052679  10.748   <2e-16 ***
T1_PSS4                              0.131641   0.052038   2.530   0.0121 *  
Age_2024                             0.004418   0.031941   0.138   0.8901    
T1_Gender_MWWoman                    0.533300   0.290513   1.836   0.0677 .  
T1_EducationMIUniversity (Bachelor)  0.057229   0.392923   0.146   0.8843    
T1_EducationMIUniversity (Postgrad) -0.201027   0.477575  -0.421   0.6742    
T1_EducationMIVocational            -0.311572   0.537492  -0.580   0.5627    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.064 on 227 degrees of freedom
Multiple R-squared:  0.4526,    Adjusted R-squared:  0.4357 
F-statistic: 26.81 on 7 and 227 DF,  p-value: < 2.2e-16
Code
confint(BAT12Cog_model_A_Cov, level = 0.95)
                                          2.5 %     97.5 %
(Intercept)                          0.30826280 3.89027032
T1_BAT12_Cognitive                   0.46237349 0.66997737
T1_PSS4                              0.02910194 0.23418060
Age_2024                            -0.05852046 0.06735731
T1_Gender_MWWoman                   -0.03914803 1.10574785
T1_EducationMIUniversity (Bachelor) -0.71701418 0.83147163
T1_EducationMIUniversity (Postgrad) -1.14207434 0.74001936
T1_EducationMIVocational            -1.37068405 0.74754077
Code
vif(BAT12Cog_model_A_Cov)
                       GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Cognitive 1.226070  1        1.107280
T1_PSS4            1.216762  1        1.103070
Age_2024           1.531782  1        1.237652
T1_Gender_MW       1.025771  1        1.012803
T1_EducationMI     1.573256  3        1.078450
Code
plot(BAT12Cog_model_A_Cov, which = 1)  

Code
bptest(BAT12Cog_model_A_Cov, ~ fitted(BAT12Cog_model_A_Cov) + I(fitted(BAT12Cog_model_A_Cov)^2))

    studentized Breusch-Pagan test

data:  BAT12Cog_model_A_Cov
BP = 1.072, df = 2, p-value = 0.5851
Code
# BAT12Emo_model_A_Cov <- lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_CC)
BAT12Emo_model_A_Cov <- readRDS("BAT12Emo_model_A_Cov_final.RDS")
summary(BAT12Emo_model_A_Cov)

Call:
lm(formula = T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.5680 -1.2246 -0.4112  0.9888  6.2222 

Coefficients:
                                    Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          2.12692    0.82459   2.579  0.01053 *  
T1_BAT12_Emotion                     0.59809    0.06231   9.599  < 2e-16 ***
T1_PSS4                              0.13872    0.04878   2.844  0.00487 ** 
Age_2024                            -0.05421    0.03035  -1.786  0.07538 .  
T1_Gender_MWWoman                    0.34869    0.27504   1.268  0.20619    
T1_EducationMIUniversity (Bachelor)  0.58128    0.37186   1.563  0.11941    
T1_EducationMIUniversity (Postgrad)  0.42969    0.45212   0.950  0.34292    
T1_EducationMIVocational             0.68098    0.51026   1.335  0.18335    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.954 on 227 degrees of freedom
Multiple R-squared:  0.4156,    Adjusted R-squared:  0.3975 
F-statistic: 23.06 on 7 and 227 DF,  p-value: < 2.2e-16
Code
confint(BAT12Emo_model_A_Cov, level = 0.95)
                                          2.5 %      97.5 %
(Intercept)                          0.50208732 3.751743128
T1_BAT12_Emotion                     0.47530989 0.720865748
T1_PSS4                              0.04259863 0.234835301
Age_2024                            -0.11401555 0.005588578
T1_Gender_MWWoman                   -0.19327777 0.890648972
T1_EducationMIUniversity (Bachelor) -0.15146267 1.314027853
T1_EducationMIUniversity (Postgrad) -0.46119346 1.320571531
T1_EducationMIVocational            -0.32447218 1.686428337
Code
vif(BAT12Emo_model_A_Cov)
                     GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Emotion 1.228554  1        1.108402
T1_PSS4          1.193195  1        1.092335
Age_2024         1.543353  1        1.242318
T1_Gender_MW     1.026106  1        1.012969
T1_EducationMI   1.574142  3        1.078551
Code
hist(resid(BAT12Emo_model_A_Cov))

Code
plot(BAT12Emo_model_A_Cov, which = 1)

Code
bptest(BAT12Emo_model_A_Cov, ~ fitted(BAT12Emo_model_A_Cov) + I(fitted(BAT12Emo_model_A_Cov)^2))

    studentized Breusch-Pagan test

data:  BAT12Emo_model_A_Cov
BP = 2.1207, df = 2, p-value = 0.3463
Code
# BAT12Ment_model_A_Cov <- lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_CC)
BAT12Ment_model_A_Cov <- readRDS("BAT12Ment_model_A_Cov_final.RDS")
summary(BAT12Ment_model_A_Cov)

Call:
lm(formula = T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + 
    T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_CC)

Residuals:
   Min     1Q Median     3Q    Max 
-6.023 -1.153 -0.153  1.369  7.990 

Coefficients:
                                      Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          2.0898535  0.8622203   2.424   0.0161 *  
T1_BAT12_MentalDistance              0.6350816  0.0612991  10.360   <2e-16 ***
T1_PSS4                              0.1428481  0.0559946   2.551   0.0114 *  
Age_2024                            -0.0060912  0.0319221  -0.191   0.8488    
T1_Gender_MWWoman                   -0.0002875  0.2856687  -0.001   0.9992    
T1_EducationMIUniversity (Bachelor)  0.2022002  0.3879595   0.521   0.6027    
T1_EducationMIUniversity (Postgrad) -0.2710286  0.4739328  -0.572   0.5680    
T1_EducationMIVocational             0.0038123  0.5307818   0.007   0.9943    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.037 on 227 degrees of freedom
Multiple R-squared:  0.4806,    Adjusted R-squared:  0.4646 
F-statistic: 30.01 on 7 and 227 DF,  p-value: < 2.2e-16
Code
confint(BAT12Ment_model_A_Cov, level = 0.95)
                                          2.5 %    97.5 %
(Intercept)                          0.39087464 3.7888324
T1_BAT12_MentalDistance              0.51429365 0.7558695
T1_PSS4                              0.03251242 0.2531839
Age_2024                            -0.06899274 0.0568104
T1_Gender_MWWoman                   -0.56318900 0.5626140
T1_EducationMIUniversity (Bachelor) -0.56226212 0.9666625
T1_EducationMIUniversity (Postgrad) -1.20489867 0.6628415
T1_EducationMIVocational            -1.04207709 1.0497017
Code
vif(BAT12Ment_model_A_Cov)
                            GVIF Df GVIF^(1/(2*Df))
T1_BAT12_MentalDistance 1.455916  1        1.206614
T1_PSS4                 1.446033  1        1.202511
Age_2024                1.570373  1        1.253145
T1_Gender_MW            1.018039  1        1.008979
T1_EducationMI          1.579435  3        1.079155
Code
plot(BAT12Ment_model_A_Cov, which = 1)

Code
bptest(BAT12Ment_model_A_Cov, ~ fitted(BAT12Ment_model_A_Cov) + I(fitted(BAT12Ment_model_A_Cov)^2))

    studentized Breusch-Pagan test

data:  BAT12Ment_model_A_Cov
BP = 1.5516, df = 2, p-value = 0.4603
Code
# BAT12Exh_model_A_Cov <- lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_CC)
BAT12Exh_model_A_Cov <- readRDS("BAT12Exh_model_A_Cov_final.RDS")
summary(BAT12Exh_model_A_Cov)

Call:
lm(formula = T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-5.9890 -1.1582  0.0262  1.2892  4.6404 

Coefficients:
                                    Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          3.94989    0.88652   4.455 1.31e-05 ***
T1_BAT12_Exhaustion                  0.53502    0.05666   9.443  < 2e-16 ***
T1_PSS4                              0.12593    0.05198   2.423   0.0162 *  
Age_2024                            -0.04558    0.03052  -1.493   0.1368    
T1_Gender_MWWoman                    0.50196    0.27976   1.794   0.0741 .  
T1_EducationMIUniversity (Bachelor)  0.21821    0.37529   0.581   0.5615    
T1_EducationMIUniversity (Postgrad)  0.07865    0.45907   0.171   0.8641    
T1_EducationMIVocational             0.40562    0.51403   0.789   0.4309    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.974 on 227 degrees of freedom
Multiple R-squared:  0.4387,    Adjusted R-squared:  0.4214 
F-statistic: 25.34 on 7 and 227 DF,  p-value: < 2.2e-16
Code
confint(BAT12Exh_model_A_Cov, level = 0.95)
                                          2.5 %     97.5 %
(Intercept)                          2.20302199 5.69675181
T1_BAT12_Exhaustion                  0.42337725 0.64667236
T1_PSS4                              0.02350546 0.22834895
Age_2024                            -0.10571946 0.01456509
T1_Gender_MWWoman                   -0.04928854 1.05320933
T1_EducationMIUniversity (Bachelor) -0.52129429 0.95771502
T1_EducationMIUniversity (Postgrad) -0.82592464 0.98322342
T1_EducationMIVocational            -0.60725751 1.41850334
Code
vif(BAT12Exh_model_A_Cov)
                        GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Exhaustion 1.358148  1        1.165396
T1_PSS4             1.327689  1        1.152254
Age_2024            1.529699  1        1.236810
T1_Gender_MW        1.040306  1        1.019954
T1_EducationMI      1.581414  3        1.079380
Code
plot(BAT12Exh_model_A_Cov, which = 1)

Code
bptest(BAT12Exh_model_A_Cov, ~ fitted(BAT12Exh_model_A_Cov) + I(fitted(BAT12Exh_model_A_Cov)^2))

    studentized Breusch-Pagan test

data:  BAT12Exh_model_A_Cov
BP = 2.1043, df = 2, p-value = 0.3492
Code
#Model B - Coping strategy use

# # BAT12Cog_model_B_ERall <- lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW
#                              + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                              + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                              + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                              + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                              + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance, data = df_CC)
BAT12Cog_model_B_ERall <- readRDS("BAT12Cog_model_B_ERall_final.RDS")
summary(BAT12Cog_model_B_ERall)

Call:
lm(formula = T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + T1_COPE_SelfDistraction + 
    T1_COPE_ActiveCoping + T1_COPE_Denial + T1_COPE_SubstanceUse + 
    T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + 
    T1_COPE_Religion + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + 
    T1_COPE_PositiveReframing + T1_COPE_SelfBlame + T1_COPE_Planning + 
    T1_COPE_Humor + T1_COPE_Acceptance, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.7646 -1.2402 -0.0995  1.2389  5.7028 

Coefficients:
                                     Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          0.747512   1.155563   0.647   0.5184    
T1_BAT12_Cognitive                   0.556472   0.055653   9.999   <2e-16 ***
T1_PSS4                              0.136814   0.058670   2.332   0.0206 *  
Age_2024                             0.012217   0.033389   0.366   0.7148    
T1_Gender_MWWoman                    0.384618   0.310359   1.239   0.2166    
T1_EducationMIUniversity (Bachelor) -0.010660   0.404063  -0.026   0.9790    
T1_EducationMIUniversity (Postgrad) -0.311689   0.494247  -0.631   0.5290    
T1_EducationMIVocational            -0.315931   0.549415  -0.575   0.5659    
T1_COPE_SelfDistraction             -0.003008   0.113114  -0.027   0.9788    
T1_COPE_ActiveCoping                 0.039632   0.120865   0.328   0.7433    
T1_COPE_Denial                      -0.054649   0.128890  -0.424   0.6720    
T1_COPE_SubstanceUse                 0.092241   0.148507   0.621   0.5352    
T1_COPE_UseOfEmotionalSupport        0.210164   0.149671   1.404   0.1617    
T1_COPE_BehavioralDisengagement     -0.013488   0.125799  -0.107   0.9147    
T1_COPE_Religion                    -0.037487   0.089217  -0.420   0.6748    
T1_COPE_Venting                      0.251827   0.130724   1.926   0.0554 .  
T1_COPE_UseOfInstrumentalSupport    -0.160188   0.151872  -1.055   0.2927    
T1_COPE_PositiveReframing            0.085520   0.109405   0.782   0.4353    
T1_COPE_SelfBlame                    0.063469   0.104849   0.605   0.5456    
T1_COPE_Planning                    -0.137667   0.134135  -1.026   0.3059    
T1_COPE_Humor                       -0.032732   0.084128  -0.389   0.6976    
T1_COPE_Acceptance                   0.022596   0.110254   0.205   0.8378    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.072 on 213 degrees of freedom
Multiple R-squared:  0.4821,    Adjusted R-squared:  0.431 
F-statistic: 9.441 on 21 and 213 DF,  p-value: < 2.2e-16
Code
confint(BAT12Cog_model_B_ERall, level = 0.95)
                                          2.5 %     97.5 %
(Intercept)                         -1.53029250 3.02531746
T1_BAT12_Cognitive                   0.44677034 0.66617304
T1_PSS4                              0.02116631 0.25246186
Age_2024                            -0.05359823 0.07803255
T1_Gender_MWWoman                   -0.22715151 0.99638689
T1_EducationMIUniversity (Bachelor) -0.80713475 0.78581451
T1_EducationMIUniversity (Postgrad) -1.28593203 0.66255316
T1_EducationMIVocational            -1.39891799 0.76705606
T1_COPE_SelfDistraction             -0.22597396 0.21995762
T1_COPE_ActiveCoping                -0.19861202 0.27787626
T1_COPE_Denial                      -0.30871246 0.19941410
T1_COPE_SubstanceUse                -0.20049113 0.38497230
T1_COPE_UseOfEmotionalSupport       -0.08486240 0.50519053
T1_COPE_BehavioralDisengagement     -0.26145830 0.23448282
T1_COPE_Religion                    -0.21334776 0.13837463
T1_COPE_Venting                     -0.00585035 0.50950457
T1_COPE_UseOfInstrumentalSupport    -0.45955379 0.13917728
T1_COPE_PositiveReframing           -0.13013590 0.30117544
T1_COPE_SelfBlame                   -0.14320505 0.27014250
T1_COPE_Planning                    -0.40206968 0.12673566
T1_COPE_Humor                       -0.19856232 0.13309743
T1_COPE_Acceptance                  -0.19473290 0.23992432
Code
vif(BAT12Cog_model_B_ERall)
                                     GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Cognitive               1.357146  1        1.164966
T1_PSS4                          1.533903  1        1.238508
Age_2024                         1.660016  1        1.288416
T1_Gender_MW                     1.161053  1        1.077522
T1_EducationMI                   1.817953  3        1.104749
T1_COPE_SelfDistraction          1.571198  1        1.253474
T1_COPE_ActiveCoping             2.062126  1        1.436010
T1_COPE_Denial                   1.371459  1        1.171093
T1_COPE_SubstanceUse             1.203851  1        1.097201
T1_COPE_UseOfEmotionalSupport    3.247984  1        1.802216
T1_COPE_BehavioralDisengagement  1.289379  1        1.135508
T1_COPE_Religion                 1.279808  1        1.131286
T1_COPE_Venting                  1.788012  1        1.337166
T1_COPE_UseOfInstrumentalSupport 3.294956  1        1.815201
T1_COPE_PositiveReframing        1.814628  1        1.347081
T1_COPE_SelfBlame                1.637081  1        1.279485
T1_COPE_Planning                 2.638538  1        1.624358
T1_COPE_Humor                    1.292728  1        1.136982
T1_COPE_Acceptance               1.710939  1        1.308029
Code
plot(BAT12Cog_model_B_ERall, which = 1)

Code
bptest(BAT12Cog_model_B_ERall, ~ fitted(BAT12Cog_model_B_ERall) + I(fitted(BAT12Cog_model_B_ERall)^2))

    studentized Breusch-Pagan test

data:  BAT12Cog_model_B_ERall
BP = 0.34314, df = 2, p-value = 0.8423
Code
# # BAT12Emo_model_B_ERall <- lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW
#                             + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                             + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                             + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                             + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                             + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance, data = df_CC)
BAT12Emo_model_B_ERall <- readRDS("BAT12Emo_model_B_ERall_final.RDS")
summary(BAT12Emo_model_B_ERall)

Call:
lm(formula = T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + T1_COPE_SelfDistraction + 
    T1_COPE_ActiveCoping + T1_COPE_Denial + T1_COPE_SubstanceUse + 
    T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + 
    T1_COPE_Religion + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + 
    T1_COPE_PositiveReframing + T1_COPE_SelfBlame + T1_COPE_Planning + 
    T1_COPE_Humor + T1_COPE_Acceptance, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.5438 -1.2876 -0.3127  1.0136  6.1227 

Coefficients:
                                     Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          1.379038   1.076276   1.281   0.2015    
T1_BAT12_Emotion                     0.570922   0.066536   8.581 1.97e-15 ***
T1_PSS4                              0.108340   0.055273   1.960   0.0513 .  
Age_2024                            -0.049986   0.031559  -1.584   0.1147    
T1_Gender_MWWoman                    0.323102   0.290151   1.114   0.2667    
T1_EducationMIUniversity (Bachelor)  0.580349   0.378838   1.532   0.1270    
T1_EducationMIUniversity (Postgrad)  0.443494   0.464861   0.954   0.3411    
T1_EducationMIVocational             0.703321   0.517676   1.359   0.1757    
T1_COPE_SelfDistraction             -0.083875   0.105580  -0.794   0.4278    
T1_COPE_ActiveCoping                 0.051505   0.112166   0.459   0.6466    
T1_COPE_Denial                      -0.078781   0.122619  -0.642   0.5212    
T1_COPE_SubstanceUse                 0.316688   0.138992   2.278   0.0237 *  
T1_COPE_UseOfEmotionalSupport        0.010630   0.141065   0.075   0.9400    
T1_COPE_BehavioralDisengagement      0.072474   0.118660   0.611   0.5420    
T1_COPE_Religion                     0.006101   0.083870   0.073   0.9421    
T1_COPE_Venting                      0.150176   0.123423   1.217   0.2250    
T1_COPE_UseOfInstrumentalSupport     0.028937   0.143920   0.201   0.8408    
T1_COPE_PositiveReframing            0.068733   0.103270   0.666   0.5064    
T1_COPE_SelfBlame                    0.108221   0.098431   1.099   0.2728    
T1_COPE_Planning                    -0.145739   0.126017  -1.156   0.2488    
T1_COPE_Humor                        0.044031   0.078786   0.559   0.5768    
T1_COPE_Acceptance                  -0.116056   0.103636  -1.120   0.2640    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.948 on 213 degrees of freedom
Multiple R-squared:  0.4547,    Adjusted R-squared:  0.4009 
F-statistic: 8.457 on 21 and 213 DF,  p-value: < 2.2e-16
Code
confint(BAT12Emo_model_B_ERall, level = 0.95)
                                            2.5 %     97.5 %
(Intercept)                         -0.7424789587 3.50055405
T1_BAT12_Emotion                     0.4397678976 0.70207529
T1_PSS4                             -0.0006116847 0.21729193
Age_2024                            -0.1121930948 0.01222199
T1_Gender_MWWoman                   -0.2488341772 0.89503748
T1_EducationMIUniversity (Bachelor) -0.1664024066 1.32710122
T1_EducationMIUniversity (Postgrad) -0.4728230812 1.35981205
T1_EducationMIVocational            -0.3171038124 1.72374577
T1_COPE_SelfDistraction             -0.2919900670 0.12424089
T1_COPE_ActiveCoping                -0.1695915576 0.27260251
T1_COPE_Denial                      -0.3204832215 0.16292130
T1_COPE_SubstanceUse                 0.0427115016 0.59066478
T1_COPE_UseOfEmotionalSupport       -0.2674317758 0.28869178
T1_COPE_BehavioralDisengagement     -0.1614246188 0.30637316
T1_COPE_Religion                    -0.1592198037 0.17142264
T1_COPE_Venting                     -0.0931099904 0.39346268
T1_COPE_UseOfInstrumentalSupport    -0.2547535332 0.31262789
T1_COPE_PositiveReframing           -0.1348281493 0.27229491
T1_COPE_SelfBlame                   -0.0858025121 0.30224468
T1_COPE_Planning                    -0.3941397475 0.10266199
T1_COPE_Humor                       -0.1112699484 0.19933127
T1_COPE_Acceptance                  -0.3203400057 0.08822733
Code
vif(BAT12Emo_model_B_ERall)
                                     GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Emotion                 1.408825  1        1.186939
T1_PSS4                          1.540671  1        1.241238
Age_2024                         1.678268  1        1.295480
T1_Gender_MW                     1.148390  1        1.071629
T1_EducationMI                   1.824330  3        1.105394
T1_COPE_SelfDistraction          1.549106  1        1.244631
T1_COPE_ActiveCoping             2.009807  1        1.417677
T1_COPE_Denial                   1.404683  1        1.185193
T1_COPE_SubstanceUse             1.193378  1        1.092419
T1_COPE_UseOfEmotionalSupport    3.265070  1        1.806950
T1_COPE_BehavioralDisengagement  1.298239  1        1.139403
T1_COPE_Religion                 1.279911  1        1.131331
T1_COPE_Venting                  1.803727  1        1.343029
T1_COPE_UseOfInstrumentalSupport 3.348529  1        1.829899
T1_COPE_PositiveReframing        1.829680  1        1.352657
T1_COPE_SelfBlame                1.632775  1        1.277801
T1_COPE_Planning                 2.635456  1        1.623409
T1_COPE_Humor                    1.283056  1        1.132721
T1_COPE_Acceptance               1.710748  1        1.307955
Code
plot(BAT12Emo_model_B_ERall, which = 1)

Code
bptest(BAT12Emo_model_B_ERall, ~ fitted(BAT12Emo_model_B_ERall) + I(fitted(BAT12Emo_model_B_ERall)^2))

    studentized Breusch-Pagan test

data:  BAT12Emo_model_B_ERall
BP = 3.5541, df = 2, p-value = 0.1691
Code
# # BAT12Ment_model_B_ERall <- lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW
#                              + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                              + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                              + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                              + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                              + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance, data = df_CC)
BAT12Ment_model_B_ERall <- readRDS("BAT12Ment_model_B_ERall_final.RDS")
summary(BAT12Ment_model_B_ERall)

Call:
lm(formula = T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + 
    T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_COPE_SelfDistraction + 
    T1_COPE_ActiveCoping + T1_COPE_Denial + T1_COPE_SubstanceUse + 
    T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + 
    T1_COPE_Religion + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + 
    T1_COPE_PositiveReframing + T1_COPE_SelfBlame + T1_COPE_Planning + 
    T1_COPE_Humor + T1_COPE_Acceptance, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-6.0094 -1.1242 -0.1809  1.0268  6.2631 

Coefficients:
                                     Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          1.400231   1.103764   1.269   0.2060    
T1_BAT12_MentalDistance              0.626874   0.062590  10.016   <2e-16 ***
T1_PSS4                              0.118115   0.061969   1.906   0.0580 .  
Age_2024                            -0.007061   0.032674  -0.216   0.8291    
T1_Gender_MWWoman                   -0.239673   0.297157  -0.807   0.4208    
T1_EducationMIUniversity (Bachelor)  0.205877   0.389976   0.528   0.5981    
T1_EducationMIUniversity (Postgrad) -0.239458   0.480436  -0.498   0.6187    
T1_EducationMIVocational            -0.005313   0.530187  -0.010   0.9920    
T1_COPE_SelfDistraction             -0.060258   0.108190  -0.557   0.5781    
T1_COPE_ActiveCoping                 0.132812   0.115727   1.148   0.2524    
T1_COPE_Denial                      -0.116905   0.124393  -0.940   0.3484    
T1_COPE_SubstanceUse                 0.287232   0.142470   2.016   0.0450 *  
T1_COPE_UseOfEmotionalSupport        0.135705   0.144612   0.938   0.3491    
T1_COPE_BehavioralDisengagement      0.285031   0.121427   2.347   0.0198 *  
T1_COPE_Religion                    -0.140721   0.085941  -1.637   0.1030    
T1_COPE_Venting                      0.077936   0.126906   0.614   0.5398    
T1_COPE_UseOfInstrumentalSupport    -0.014645   0.147002  -0.100   0.9207    
T1_COPE_PositiveReframing           -0.010086   0.106040  -0.095   0.9243    
T1_COPE_SelfBlame                    0.104636   0.101620   1.030   0.3043    
T1_COPE_Planning                    -0.101964   0.129388  -0.788   0.4315    
T1_COPE_Humor                       -0.141257   0.080575  -1.753   0.0810 .  
T1_COPE_Acceptance                  -0.036249   0.106408  -0.341   0.7337    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2 on 213 degrees of freedom
Multiple R-squared:  0.5304,    Adjusted R-squared:  0.4841 
F-statistic: 11.46 on 21 and 213 DF,  p-value: < 2.2e-16
Code
confint(BAT12Ment_model_B_ERall, level = 0.95)
                                           2.5 %     97.5 %
(Intercept)                         -0.775467932 3.57592981
T1_BAT12_MentalDistance              0.503499234 0.75024781
T1_PSS4                             -0.004035539 0.24026555
Age_2024                            -0.071466874 0.05734513
T1_Gender_MWWoman                   -0.825418186 0.34607283
T1_EducationMIUniversity (Bachelor) -0.562829045 0.97458264
T1_EducationMIUniversity (Postgrad) -1.186476398 0.70756047
T1_EducationMIVocational            -1.050399772 1.03977312
T1_COPE_SelfDistraction             -0.273516967 0.15300168
T1_COPE_ActiveCoping                -0.095305069 0.36092863
T1_COPE_Denial                      -0.362104262 0.12829526
T1_COPE_SubstanceUse                 0.006400322 0.56806310
T1_COPE_UseOfEmotionalSupport       -0.149348871 0.42075911
T1_COPE_BehavioralDisengagement      0.045679154 0.52438263
T1_COPE_Religion                    -0.310124782 0.02868236
T1_COPE_Venting                     -0.172216421 0.32808849
T1_COPE_UseOfInstrumentalSupport    -0.304410380 0.27511939
T1_COPE_PositiveReframing           -0.219108053 0.19893548
T1_COPE_SelfBlame                   -0.095673453 0.30494546
T1_COPE_Planning                    -0.357009199 0.15308028
T1_COPE_Humor                       -0.300083014 0.01756896
T1_COPE_Acceptance                  -0.245996863 0.17349929
Code
vif(BAT12Ment_model_B_ERall)
                                     GVIF Df GVIF^(1/(2*Df))
T1_BAT12_MentalDistance          1.575260  1        1.255094
T1_PSS4                          1.838020  1        1.355736
Age_2024                         1.707443  1        1.306692
T1_Gender_MW                     1.143223  1        1.069216
T1_EducationMI                   1.831909  3        1.106158
T1_COPE_SelfDistraction          1.543856  1        1.242520
T1_COPE_ActiveCoping             2.030587  1        1.424987
T1_COPE_Denial                   1.372067  1        1.171353
T1_COPE_SubstanceUse             1.190038  1        1.090888
T1_COPE_UseOfEmotionalSupport    3.256735  1        1.804643
T1_COPE_BehavioralDisengagement  1.290297  1        1.135912
T1_COPE_Religion                 1.275516  1        1.129387
T1_COPE_Venting                  1.809936  1        1.345339
T1_COPE_UseOfInstrumentalSupport 3.315688  1        1.820903
T1_COPE_PositiveReframing        1.830986  1        1.353139
T1_COPE_SelfBlame                1.651728  1        1.285196
T1_COPE_Planning                 2.636942  1        1.623866
T1_COPE_Humor                    1.273681  1        1.128575
T1_COPE_Acceptance               1.711721  1        1.308327
Code
plot(BAT12Ment_model_B_ERall, which = 1)

Code
bptest(BAT12Ment_model_B_ERall, ~ fitted(BAT12Ment_model_B_ERall) + I(fitted(BAT12Ment_model_B_ERall)^2))

    studentized Breusch-Pagan test

data:  BAT12Ment_model_B_ERall
BP = 0.5246, df = 2, p-value = 0.7693
Code
# # BAT12Exh_model_B_ERall <- lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW
#                              + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                              + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                              + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                              + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                              + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance, data = df_CC)
BAT12Exh_model_B_ERall <- readRDS("BAT12Exh_model_B_ERall_final.RDS")
summary(BAT12Exh_model_B_ERall)

Call:
lm(formula = T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + T1_COPE_SelfDistraction + 
    T1_COPE_ActiveCoping + T1_COPE_Denial + T1_COPE_SubstanceUse + 
    T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + 
    T1_COPE_Religion + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + 
    T1_COPE_PositiveReframing + T1_COPE_SelfBlame + T1_COPE_Planning + 
    T1_COPE_Humor + T1_COPE_Acceptance, data = df_CC)

Residuals:
   Min     1Q Median     3Q    Max 
-5.404 -1.112 -0.027  1.225  5.073 

Coefficients:
                                     Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          2.791961   1.081257   2.582 0.010489 *  
T1_BAT12_Exhaustion                  0.504992   0.057044   8.853 3.36e-16 ***
T1_PSS4                              0.065373   0.057685   1.133 0.258373    
Age_2024                            -0.041854   0.031018  -1.349 0.178665    
T1_Gender_MWWoman                    0.302489   0.289640   1.044 0.297503    
T1_EducationMIUniversity (Bachelor)  0.297420   0.375018   0.793 0.428614    
T1_EducationMIUniversity (Postgrad)  0.103024   0.462838   0.223 0.824066    
T1_EducationMIVocational             0.469330   0.510679   0.919 0.359119    
T1_COPE_SelfDistraction              0.153646   0.104275   1.473 0.142100    
T1_COPE_ActiveCoping                 0.106772   0.112195   0.952 0.342347    
T1_COPE_Denial                      -0.128818   0.119784  -1.075 0.283404    
T1_COPE_SubstanceUse                -0.006313   0.137260  -0.046 0.963361    
T1_COPE_UseOfEmotionalSupport       -0.004617   0.138967  -0.033 0.973528    
T1_COPE_BehavioralDisengagement      0.400767   0.117058   3.424 0.000741 ***
T1_COPE_Religion                    -0.118780   0.082843  -1.434 0.153097    
T1_COPE_Venting                      0.118788   0.121588   0.977 0.329691    
T1_COPE_UseOfInstrumentalSupport    -0.053697   0.141421  -0.380 0.704548    
T1_COPE_PositiveReframing           -0.081932   0.101590  -0.806 0.420856    
T1_COPE_SelfBlame                    0.073541   0.097639   0.753 0.452168    
T1_COPE_Planning                     0.006275   0.124640   0.050 0.959892    
T1_COPE_Humor                        0.002304   0.077217   0.030 0.976223    
T1_COPE_Acceptance                  -0.028569   0.102637  -0.278 0.781012    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.927 on 213 degrees of freedom
Multiple R-squared:  0.4981,    Adjusted R-squared:  0.4486 
F-statistic: 10.06 on 21 and 213 DF,  p-value: < 2.2e-16
Code
confint(BAT12Exh_model_B_ERall, level = 0.95)
                                          2.5 %     97.5 %
(Intercept)                          0.66062530 4.92329651
T1_BAT12_Exhaustion                  0.39254982 0.61743497
T1_PSS4                             -0.04833332 0.17907861
Age_2024                            -0.10299589 0.01928842
T1_Gender_MWWoman                   -0.26843988 0.87341696
T1_EducationMIUniversity (Bachelor) -0.44180274 1.03664183
T1_EducationMIUniversity (Postgrad) -0.80930571 1.01535433
T1_EducationMIVocational            -0.53730248 1.47596307
T1_COPE_SelfDistraction             -0.05189673 0.35918868
T1_COPE_ActiveCoping                -0.11438338 0.32792755
T1_COPE_Denial                      -0.36493276 0.10729620
T1_COPE_SubstanceUse                -0.27687452 0.26424929
T1_COPE_UseOfEmotionalSupport       -0.27854380 0.26930999
T1_COPE_BehavioralDisengagement      0.17002697 0.63150696
T1_COPE_Religion                    -0.28207657 0.04451704
T1_COPE_Venting                     -0.12088138 0.35845711
T1_COPE_UseOfInstrumentalSupport    -0.33246078 0.22506642
T1_COPE_PositiveReframing           -0.28218127 0.11831790
T1_COPE_SelfBlame                   -0.11892186 0.26600333
T1_COPE_Planning                    -0.23940973 0.25196040
T1_COPE_Humor                       -0.14990378 0.15451205
T1_COPE_Acceptance                  -0.23088442 0.17374564
Code
vif(BAT12Exh_model_B_ERall)
                                     GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Exhaustion              1.444501  1        1.201874
T1_PSS4                          1.715878  1        1.309915
Age_2024                         1.657812  1        1.287561
T1_Gender_MW                     1.170137  1        1.081729
T1_EducationMI                   1.834610  3        1.106430
T1_COPE_SelfDistraction          1.545095  1        1.243018
T1_COPE_ActiveCoping             2.056187  1        1.433941
T1_COPE_Denial                   1.370695  1        1.170767
T1_COPE_SubstanceUse             1.190044  1        1.090892
T1_COPE_UseOfEmotionalSupport    3.240096  1        1.800027
T1_COPE_BehavioralDisengagement  1.291882  1        1.136610
T1_COPE_Religion                 1.276899  1        1.130000
T1_COPE_Venting                  1.789941  1        1.337887
T1_COPE_UseOfInstrumentalSupport 3.306090  1        1.818266
T1_COPE_PositiveReframing        1.810530  1        1.345559
T1_COPE_SelfBlame                1.642815  1        1.281724
T1_COPE_Planning                 2.636245  1        1.623652
T1_COPE_Humor                    1.260238  1        1.122603
T1_COPE_Acceptance               1.715748  1        1.309866
Code
plot(BAT12Exh_model_B_ERall, which = 1)

Code
bptest(BAT12Exh_model_B_ERall, ~ fitted(BAT12Exh_model_B_ERall) + I(fitted(BAT12Exh_model_B_ERall)^2))

    studentized Breusch-Pagan test

data:  BAT12Exh_model_B_ERall
BP = 1.0112, df = 2, p-value = 0.6031
Code
#Model C - Cog Flex CST
# BAT12Cog_model_C_CST <- lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, data = df_CC)
BAT12Cog_model_C_CST <- readRDS("BAT12Cog_model_C_CST_final.RDS")
summary(BAT12Cog_model_C_CST)

Call:
lm(formula = T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, 
    data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.9023 -1.3291 -0.1372  1.3023  5.6171 

Coefficients:
                                      Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          2.2311690  0.9198735   2.426   0.0161 *  
T1_BAT12_Cognitive                   0.5732316  0.0532219  10.771   <2e-16 ***
T1_PSS4                              0.1309792  0.0520557   2.516   0.0126 *  
Age_2024                             0.0025144  0.0320129   0.079   0.9375    
T1_Gender_MWWoman                    0.5326560  0.2905866   1.833   0.0681 .  
T1_EducationMIUniversity (Bachelor)  0.1002789  0.3956703   0.253   0.8002    
T1_EducationMIUniversity (Postgrad) -0.1693791  0.4788745  -0.354   0.7239    
T1_EducationMIVocational            -0.2630226  0.5400921  -0.487   0.6267    
CST_switchcost.1                    -0.0008005  0.0008500  -0.942   0.3473    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.064 on 226 degrees of freedom
Multiple R-squared:  0.4547,    Adjusted R-squared:  0.4354 
F-statistic: 23.56 on 8 and 226 DF,  p-value: < 2.2e-16
Code
confint(BAT12Cog_model_C_CST, level = 0.95)
                                           2.5 %       97.5 %
(Intercept)                          0.418543282 4.0437947687
T1_BAT12_Cognitive                   0.468356928 0.6781062384
T1_PSS4                              0.028402582 0.2335558955
Age_2024                            -0.060567568 0.0655963870
T1_Gender_MWWoman                   -0.039949666 1.1052617454
T1_EducationMIUniversity (Bachelor) -0.679395853 0.8799537301
T1_EducationMIUniversity (Postgrad) -1.113009013 0.7742507981
T1_EducationMIVocational            -1.327282851 0.8012376666
CST_switchcost.1                    -0.002475558 0.0008744639
Code
vif(BAT12Cog_model_C_CST)
                       GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Cognitive 1.250859  1        1.118418
T1_PSS4            1.216984  1        1.103170
Age_2024           1.537916  1        1.240127
T1_Gender_MW       1.025776  1        1.012806
T1_EducationMI     1.596969  3        1.081142
CST_switchcost.1   1.042275  1        1.020919
Code
plot(BAT12Cog_model_C_CST, which = 1)

Code
bptest(BAT12Cog_model_C_CST, ~ fitted(BAT12Cog_model_C_CST) + I(fitted(BAT12Cog_model_C_CST)^2))

    studentized Breusch-Pagan test

data:  BAT12Cog_model_C_CST
BP = 1.4547, df = 2, p-value = 0.4832
Code
# BAT12Emo_model_C_CST <- lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, data = df_CC)
BAT12Emo_model_C_CST <- readRDS("BAT12Emo_model_C_CST_final.RDS")
summary(BAT12Emo_model_C_CST)

Call:
lm(formula = T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, 
    data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.5578 -1.2156 -0.4089  0.9839  6.2229 

Coefficients:
                                      Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          2.108e+00  8.430e-01   2.500  0.01312 *  
T1_BAT12_Emotion                     5.980e-01  6.246e-02   9.574  < 2e-16 ***
T1_PSS4                              1.385e-01  4.892e-02   2.832  0.00505 ** 
Age_2024                            -5.397e-02  3.049e-02  -1.770  0.07805 .  
T1_Gender_MWWoman                    3.482e-01  2.757e-01   1.263  0.20780    
T1_EducationMIUniversity (Bachelor)  5.760e-01  3.755e-01   1.534  0.12643    
T1_EducationMIUniversity (Postgrad)  4.261e-01  4.542e-01   0.938  0.34919    
T1_EducationMIVocational             6.754e-01  5.136e-01   1.315  0.18988    
CST_switchcost.1                     9.248e-05  7.983e-04   0.116  0.90788    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.958 on 226 degrees of freedom
Multiple R-squared:  0.4156,    Adjusted R-squared:  0.3949 
F-statistic: 20.09 on 8 and 226 DF,  p-value: < 2.2e-16
Code
confint(BAT12Emo_model_C_CST, level = 0.95)
                                           2.5 %      97.5 %
(Intercept)                          0.446477388 3.768768138
T1_BAT12_Emotion                     0.474884548 0.721023646
T1_PSS4                              0.042124166 0.234906555
Age_2024                            -0.114046954 0.006108782
T1_Gender_MWWoman                   -0.194971473 0.891450255
T1_EducationMIUniversity (Bachelor) -0.163901130 1.315859390
T1_EducationMIUniversity (Postgrad) -0.468892955 1.321035373
T1_EducationMIVocational            -0.336753283 1.687530239
CST_switchcost.1                    -0.001480582 0.001665542
Code
vif(BAT12Emo_model_C_CST)
                     GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Emotion 1.228974  1        1.108591
T1_PSS4          1.194707  1        1.093027
Age_2024         1.550778  1        1.245302
T1_Gender_MW     1.026306  1        1.013068
T1_EducationMI   1.600053  3        1.081490
CST_switchcost.1 1.021969  1        1.010925
Code
plot(BAT12Emo_model_C_CST, which = 1)

Code
bptest(BAT12Emo_model_C_CST, ~ fitted(BAT12Emo_model_C_CST) + I(fitted(BAT12Emo_model_C_CST)^2))

    studentized Breusch-Pagan test

data:  BAT12Emo_model_C_CST
BP = 2.1345, df = 2, p-value = 0.3439
Code
# BAT12Ment_model_C_CST <- lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, data = df_CC)
BAT12Ment_model_C_CST <- readRDS("BAT12Ment_model_C_CST_final.RDS")
summary(BAT12Ment_model_C_CST)

Call:
lm(formula = T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + 
    T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, 
    data = df_CC)

Residuals:
   Min     1Q Median     3Q    Max 
-6.023 -1.147 -0.166  1.370  7.996 

Coefficients:
                                      Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          2.080e+00  8.799e-01   2.364   0.0189 *  
T1_BAT12_MentalDistance              6.347e-01  6.169e-02  10.289   <2e-16 ***
T1_PSS4                              1.429e-01  5.612e-02   2.546   0.0116 *  
Age_2024                            -5.936e-03  3.210e-02  -0.185   0.8535    
T1_Gender_MWWoman                   -4.104e-04  2.863e-01  -0.001   0.9989    
T1_EducationMIUniversity (Bachelor)  1.992e-01  3.921e-01   0.508   0.6119    
T1_EducationMIUniversity (Postgrad) -2.732e-01  4.764e-01  -0.573   0.5669    
T1_EducationMIVocational             6.887e-04  5.346e-01   0.001   0.9990    
CST_switchcost.1                     4.943e-05  8.358e-04   0.059   0.9529    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.042 on 226 degrees of freedom
Multiple R-squared:  0.4807,    Adjusted R-squared:  0.4623 
F-statistic: 26.15 on 8 and 226 DF,  p-value: < 2.2e-16
Code
confint(BAT12Ment_model_C_CST, level = 0.95)
                                           2.5 %      97.5 %
(Intercept)                          0.346077032 3.813976882
T1_BAT12_MentalDistance              0.513183676 0.756313072
T1_PSS4                              0.032295696 0.253470675
Age_2024                            -0.069189414 0.057317651
T1_Gender_MWWoman                   -0.564579812 0.563758967
T1_EducationMIUniversity (Bachelor) -0.573461553 0.971859852
T1_EducationMIUniversity (Postgrad) -1.212072369 0.665598991
T1_EducationMIVocational            -1.052682507 1.054059892
CST_switchcost.1                    -0.001597502 0.001696365
Code
vif(BAT12Ment_model_C_CST)
                            GVIF Df GVIF^(1/(2*Df))
T1_BAT12_MentalDistance 1.468159  1        1.211676
T1_PSS4                 1.446194  1        1.202578
Age_2024                1.580950  1        1.257359
T1_Gender_MW            1.018092  1        1.009006
T1_EducationMI          1.608188  3        1.082404
CST_switchcost.1        1.030210  1        1.014993
Code
plot(BAT12Ment_model_C_CST, which = 1)

Code
bptest(BAT12Ment_model_C_CST, ~ fitted(BAT12Ment_model_C_CST) + I(fitted(BAT12Ment_model_C_CST)^2))

    studentized Breusch-Pagan test

data:  BAT12Ment_model_C_CST
BP = 1.5451, df = 2, p-value = 0.4618
Code
# BAT12Exh_model_C_CST <- lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, data = df_CC)
BAT12Exh_model_C_CST <- readRDS("BAT12Exh_model_C_CST_final.RDS")
summary(BAT12Exh_model_C_CST)

Call:
lm(formula = T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1, 
    data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-5.9507 -1.1364  0.0778  1.3331  4.6172 

Coefficients:
                                      Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          3.8623495  0.8987078   4.298 2.57e-05 ***
T1_BAT12_Exhaustion                  0.5316219  0.0569976   9.327  < 2e-16 ***
T1_PSS4                              0.1260950  0.0520490   2.423   0.0162 *  
Age_2024                            -0.0442813  0.0306332  -1.446   0.1497    
T1_Gender_MWWoman                    0.5020706  0.2801317   1.792   0.0744 .  
T1_EducationMIUniversity (Bachelor)  0.1880651  0.3788845   0.496   0.6201    
T1_EducationMIUniversity (Postgrad)  0.0559759  0.4611138   0.121   0.9035    
T1_EducationMIVocational             0.3740440  0.5171983   0.723   0.4703    
CST_switchcost.1                     0.0005056  0.0008093   0.625   0.5328    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.976 on 226 degrees of freedom
Multiple R-squared:  0.4396,    Adjusted R-squared:  0.4198 
F-statistic: 22.16 on 8 and 226 DF,  p-value: < 2.2e-16
Code
confint(BAT12Exh_model_C_CST, level = 0.95)
                                           2.5 %      97.5 %
(Intercept)                          2.091431110 5.633267925
T1_BAT12_Exhaustion                  0.419307300 0.643936514
T1_PSS4                              0.023531615 0.228658384
Age_2024                            -0.104644542 0.016081887
T1_Gender_MWWoman                   -0.049933470 1.054074597
T1_EducationMIUniversity (Bachelor) -0.558533004 0.934663224
T1_EducationMIUniversity (Postgrad) -0.852656341 0.964608204
T1_EducationMIVocational            -0.645103746 1.393191692
CST_switchcost.1                    -0.001089208 0.002100317
Code
vif(BAT12Exh_model_C_CST)
                        GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Exhaustion 1.370668  1        1.170755
T1_PSS4             1.327725  1        1.152269
Age_2024            1.536746  1        1.239656
T1_Gender_MW        1.040307  1        1.019954
T1_EducationMI      1.609224  3        1.082520
CST_switchcost.1    1.031038  1        1.015400
Code
bptest(BAT12Exh_model_C_CST, ~ fitted(BAT12Exh_model_C_CST) + I(fitted(BAT12Exh_model_C_CST)^2))

    studentized Breusch-Pagan test

data:  BAT12Exh_model_C_CST
BP = 1.6592, df = 2, p-value = 0.4362
Code
#Model D - Coping Flex CFS
# BAT12Cog_model_D_CFS <- lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new, data = df_CC)
BAT12Cog_model_D_CFS <- readRDS("BAT12Cog_model_D_CFS_final.RDS")
summary(BAT12Cog_model_D_CFS)

Call:
lm(formula = T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + 
    T1_CFS_Evaluation_new, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.9105 -1.2853 -0.1982  1.3360  5.7256 

Coefficients:
                                     Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          2.309231   1.053295   2.192   0.0294 *  
T1_BAT12_Cognitive                   0.559334   0.052464  10.661   <2e-16 ***
T1_PSS4                              0.134505   0.052864   2.544   0.0116 *  
Age_2024                            -0.001075   0.032004  -0.034   0.9732    
T1_Gender_MWWoman                    0.522680   0.288821   1.810   0.0717 .  
T1_EducationMIUniversity (Bachelor)  0.124729   0.391979   0.318   0.7506    
T1_EducationMIUniversity (Postgrad) -0.138801   0.476123  -0.292   0.7709    
T1_EducationMIVocational            -0.217311   0.538031  -0.404   0.6867    
T1_CFS_Adaptive                      0.098595   0.058833   1.676   0.0952 .  
T1_CFS_Evaluation_new               -0.192342   0.090411  -2.127   0.0345 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.051 on 225 degrees of freedom
Multiple R-squared:  0.4639,    Adjusted R-squared:  0.4425 
F-statistic: 21.63 on 9 and 225 DF,  p-value: < 2.2e-16
Code
confint(BAT12Cog_model_D_CFS, level = 0.95)
                                          2.5 %      97.5 %
(Intercept)                          0.23364686  4.38481572
T1_BAT12_Cognitive                   0.45594918  0.66271792
T1_PSS4                              0.03033280  0.23867673
Age_2024                            -0.06414153  0.06199070
T1_Gender_MWWoman                   -0.04646045  1.09182098
T1_EducationMIUniversity (Bachelor) -0.64769055  0.89714799
T1_EducationMIUniversity (Postgrad) -1.07703068  0.79942872
T1_EducationMIVocational            -1.27753492  0.84291319
T1_CFS_Adaptive                     -0.01733948  0.21452899
T1_CFS_Evaluation_new               -0.37050306 -0.01418026
Code
vif(BAT12Cog_model_D_CFS)
                          GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Cognitive    1.230876  1        1.109449
T1_PSS4               1.270945  1        1.127362
Age_2024              1.556508  1        1.247601
T1_Gender_MW          1.026167  1        1.012999
T1_EducationMI        1.599352  3        1.081411
T1_CFS_Adaptive       1.674802  1        1.294141
T1_CFS_Evaluation_new 1.660166  1        1.288474
Code
plot(BAT12Cog_model_D_CFS, which = 1)

Code
bptest(BAT12Cog_model_D_CFS, ~ fitted(BAT12Cog_model_D_CFS) + I(fitted(BAT12Cog_model_D_CFS)^2))

    studentized Breusch-Pagan test

data:  BAT12Cog_model_D_CFS
BP = 0.85847, df = 2, p-value = 0.651
Code
# BAT12Emo_model_D_CFS <- lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new, data = df_CC)
BAT12Emo_model_D_CFS <- readRDS("BAT12Emo_model_D_CFS_final.RDS")
summary(BAT12Emo_model_D_CFS)

Call:
lm(formula = T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + 
    T1_CFS_Evaluation_new, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.4945 -1.3000 -0.4328  1.0255  6.1539 

Coefficients:
                                    Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          2.70661    0.97144   2.786  0.00579 ** 
T1_BAT12_Emotion                     0.60118    0.06275   9.581  < 2e-16 ***
T1_PSS4                              0.12563    0.05014   2.506  0.01293 *  
Age_2024                            -0.05681    0.03065  -1.854  0.06511 .  
T1_Gender_MWWoman                    0.34786    0.27542   1.263  0.20788    
T1_EducationMIUniversity (Bachelor)  0.58033    0.37315   1.555  0.12130    
T1_EducationMIUniversity (Postgrad)  0.44190    0.45367   0.974  0.33108    
T1_EducationMIVocational             0.71178    0.51364   1.386  0.16719    
T1_CFS_Adaptive                     -0.06624    0.05597  -1.184  0.23785    
T1_CFS_Evaluation_new                0.02096    0.08644   0.243  0.80861    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.955 on 225 degrees of freedom
Multiple R-squared:  0.4201,    Adjusted R-squared:  0.3969 
F-statistic: 18.11 on 9 and 225 DF,  p-value: < 2.2e-16
Code
confint(BAT12Emo_model_D_CFS, level = 0.95)
                                          2.5 %      97.5 %
(Intercept)                          0.79233208 4.620893472
T1_BAT12_Emotion                     0.47753945 0.724829867
T1_PSS4                              0.02682488 0.224438076
Age_2024                            -0.11720776 0.003585489
T1_Gender_MWWoman                   -0.19486146 0.890588747
T1_EducationMIUniversity (Bachelor) -0.15498274 1.315643408
T1_EducationMIUniversity (Postgrad) -0.45209168 1.335894941
T1_EducationMIVocational            -0.30038419 1.723946734
T1_CFS_Adaptive                     -0.17653831 0.044051772
T1_CFS_Evaluation_new               -0.14937068 0.191295133
Code
vif(BAT12Emo_model_D_CFS)
                          GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Emotion      1.244517  1        1.115579
T1_PSS4               1.259399  1        1.122230
Age_2024              1.572356  1        1.253936
T1_Gender_MW          1.027791  1        1.013800
T1_EducationMI        1.596754  3        1.081118
T1_CFS_Adaptive       1.669623  1        1.292139
T1_CFS_Evaluation_new 1.671428  1        1.292837
Code
plot(BAT12Emo_model_D_CFS, which = 1)

Code
bptest(BAT12Emo_model_D_CFS, ~ fitted(BAT12Emo_model_D_CFS) + I(fitted(BAT12Emo_model_D_CFS)^2))

    studentized Breusch-Pagan test

data:  BAT12Emo_model_D_CFS
BP = 2.9498, df = 2, p-value = 0.2288
Code
# BAT12Ment_model_D_CFS <- lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new, data = df_CC)
BAT12Ment_model_D_CFS <- readRDS("BAT12Ment_model_D_CFS_final.RDS")
summary(BAT12Ment_model_D_CFS)

Call:
lm(formula = T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + 
    T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + 
    T1_CFS_Evaluation_new, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-6.1737 -1.2345 -0.0073  1.3642  8.0930 

Coefficients:
                                     Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          2.177147   1.014088   2.147   0.0329 *  
T1_BAT12_MentalDistance              0.628807   0.061681  10.195   <2e-16 ***
T1_PSS4                              0.146720   0.057535   2.550   0.0114 *  
Age_2024                            -0.008745   0.032195  -0.272   0.7862    
T1_Gender_MWWoman                   -0.007082   0.285794  -0.025   0.9803    
T1_EducationMIUniversity (Bachelor)  0.239456   0.389274   0.615   0.5391    
T1_EducationMIUniversity (Postgrad) -0.237996   0.475437  -0.501   0.6172    
T1_EducationMIVocational             0.058462   0.534624   0.109   0.9130    
T1_CFS_Adaptive                      0.064800   0.058676   1.104   0.2706    
T1_CFS_Evaluation_new               -0.120502   0.089771  -1.342   0.1808    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.037 on 225 degrees of freedom
Multiple R-squared:  0.4851,    Adjusted R-squared:  0.4645 
F-statistic: 23.55 on 9 and 225 DF,  p-value: < 2.2e-16
Code
confint(BAT12Ment_model_D_CFS, level = 0.95)
                                          2.5 %     97.5 %
(Intercept)                          0.17882189 4.17547227
T1_BAT12_MentalDistance              0.50726102 0.75035203
T1_PSS4                              0.03334370 0.26009718
Age_2024                            -0.07218683 0.05469712
T1_Gender_MWWoman                   -0.57025813 0.55609370
T1_EducationMIUniversity (Bachelor) -0.52763248 1.00654430
T1_EducationMIUniversity (Postgrad) -1.17487496 0.69888298
T1_EducationMIVocational            -0.99504813 1.11197268
T1_CFS_Adaptive                     -0.05082567 0.18042535
T1_CFS_Evaluation_new               -0.29740098 0.05639656
Code
vif(BAT12Ment_model_D_CFS)
                            GVIF Df GVIF^(1/(2*Df))
T1_BAT12_MentalDistance 1.473662  1        1.213945
T1_PSS4                 1.526246  1        1.235413
Age_2024                1.596850  1        1.263665
T1_Gender_MW            1.018634  1        1.009274
T1_EducationMI          1.604782  3        1.082022
T1_CFS_Adaptive         1.688880  1        1.299569
T1_CFS_Evaluation_new   1.659302  1        1.288139
Code
plot(BAT12Ment_model_D_CFS, which = 1)

Code
bptest(BAT12Ment_model_D_CFS, ~ fitted(BAT12Ment_model_D_CFS) + I(fitted(BAT12Ment_model_D_CFS)^2))

    studentized Breusch-Pagan test

data:  BAT12Ment_model_D_CFS
BP = 2.5611, df = 2, p-value = 0.2779
Code
# BAT12Exh_model_D_CFS <- lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new, data = df_CC)
BAT12Exh_model_D_CFS <- readRDS("BAT12Exh_model_D_CFS_final.RDS")
summary(BAT12Exh_model_D_CFS)

Call:
lm(formula = T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + 
    T1_CFS_Evaluation_new, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-6.0893 -1.1356  0.0417  1.1980  4.7904 

Coefficients:
                                    Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          3.60181    1.00914   3.569 0.000438 ***
T1_BAT12_Exhaustion                  0.51511    0.05704   9.031  < 2e-16 ***
T1_PSS4                              0.14657    0.05332   2.749 0.006461 ** 
Age_2024                            -0.04656    0.03056  -1.523 0.129094    
T1_Gender_MWWoman                    0.50869    0.27804   1.830 0.068638 .  
T1_EducationMIUniversity (Bachelor)  0.25289    0.37404   0.676 0.499671    
T1_EducationMIUniversity (Postgrad)  0.08884    0.45742   0.194 0.846183    
T1_EducationMIVocational             0.42885    0.51426   0.834 0.405216    
T1_CFS_Adaptive                      0.12576    0.05687   2.211 0.028023 *  
T1_CFS_Evaluation_new               -0.14013    0.08659  -1.618 0.107013    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.961 on 225 degrees of freedom
Multiple R-squared:  0.4509,    Adjusted R-squared:  0.4289 
F-statistic: 20.53 on 9 and 225 DF,  p-value: < 2.2e-16
Code
confint(BAT12Exh_model_D_CFS, level = 0.95)
                                          2.5 %     97.5 %
(Intercept)                          1.61324740 5.59038023
T1_BAT12_Exhaustion                  0.40271599 0.62750049
T1_PSS4                              0.04150843 0.25163232
Age_2024                            -0.10678020 0.01367016
T1_Gender_MWWoman                   -0.03920183 1.05657527
T1_EducationMIUniversity (Bachelor) -0.48417798 0.98995318
T1_EducationMIUniversity (Postgrad) -0.81253867 0.99021397
T1_EducationMIVocational            -0.58454025 1.44224229
T1_CFS_Adaptive                      0.01368972 0.23782223
T1_CFS_Evaluation_new               -0.31076305 0.03050916
Code
vif(BAT12Exh_model_D_CFS)
                          GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Exhaustion   1.394405  1        1.180849
T1_PSS4               1.415371  1        1.189694
Age_2024              1.554067  1        1.246622
T1_Gender_MW          1.041160  1        1.020372
T1_EducationMI        1.607339  3        1.082309
T1_CFS_Adaptive       1.713342  1        1.308947
T1_CFS_Evaluation_new 1.667326  1        1.291250
Code
plot(BAT12Exh_model_D_CFS, which = 1)

Code
bptest(BAT12Exh_model_D_CFS, ~ fitted(BAT12Exh_model_D_CFS) + I(fitted(BAT12Exh_model_D_CFS)^2))

    studentized Breusch-Pagan test

data:  BAT12Exh_model_D_CFS
BP = 2.9818, df = 2, p-value = 0.2252
Code
#Model E - All
# BAT12Cog_model_E_all <- lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
#                                + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse 
#                                + T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + T1_COPE_Religion 
#                                + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
#                                + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance
#                                + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1, data = df_CC)
BAT12Cog_model_E_all <- readRDS("BAT12Cog_model_E_all_final.RDS")
summary(BAT12Cog_model_E_all)

Call:
lm(formula = T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + T1_COPE_SelfDistraction + 
    T1_COPE_ActiveCoping + T1_COPE_Denial + T1_COPE_SubstanceUse + 
    T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + 
    T1_COPE_Religion + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + 
    T1_COPE_PositiveReframing + T1_COPE_SelfBlame + T1_COPE_Planning + 
    T1_COPE_Humor + T1_COPE_Acceptance + T1_CFS_Adaptive + T1_CFS_Evaluation_new + 
    CST_switchcost.1, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.6676 -1.3577 -0.1148  1.3244  5.3548 

Coefficients:
                                      Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          1.2514551  1.1926830   1.049   0.2953    
T1_BAT12_Cognitive                   0.5578944  0.0552339  10.101   <2e-16 ***
T1_PSS4                              0.1348163  0.0580779   2.321   0.0212 *  
Age_2024                             0.0026876  0.0330696   0.081   0.9353    
T1_Gender_MWWoman                    0.3594415  0.3062582   1.174   0.2419    
T1_EducationMIUniversity (Bachelor)  0.0958697  0.4007617   0.239   0.8112    
T1_EducationMIUniversity (Postgrad) -0.2488686  0.4874402  -0.511   0.6102    
T1_EducationMIVocational            -0.1248323  0.5453971  -0.229   0.8192    
T1_COPE_SelfDistraction             -0.0313701  0.1117347  -0.281   0.7792    
T1_COPE_ActiveCoping                 0.0925098  0.1261215   0.733   0.4641    
T1_COPE_Denial                      -0.0667351  0.1269540  -0.526   0.5997    
T1_COPE_SubstanceUse                 0.0755222  0.1464270   0.516   0.6066    
T1_COPE_UseOfEmotionalSupport        0.2464932  0.1479321   1.666   0.0972 .  
T1_COPE_BehavioralDisengagement     -0.0112375  0.1255242  -0.090   0.9288    
T1_COPE_Religion                    -0.0056758  0.0885701  -0.064   0.9490    
T1_COPE_Venting                      0.2727177  0.1300165   2.098   0.0371 *  
T1_COPE_UseOfInstrumentalSupport    -0.1979577  0.1500840  -1.319   0.1886    
T1_COPE_PositiveReframing            0.1374959  0.1096621   1.254   0.2113    
T1_COPE_SelfBlame                    0.0918115  0.1046150   0.878   0.3812    
T1_COPE_Planning                    -0.1746811  0.1328093  -1.315   0.1899    
T1_COPE_Humor                       -0.0515732  0.0835845  -0.617   0.5379    
T1_COPE_Acceptance                   0.0401822  0.1094610   0.367   0.7139    
T1_CFS_Adaptive                      0.0846179  0.0648378   1.305   0.1933    
T1_CFS_Evaluation_new               -0.2692265  0.0948934  -2.837   0.0050 ** 
CST_switchcost.1                    -0.0010145  0.0008592  -1.181   0.2390    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.04 on 210 degrees of freedom
Multiple R-squared:  0.5051,    Adjusted R-squared:  0.4485 
F-statistic: 8.929 on 24 and 210 DF,  p-value: < 2.2e-16
Code
confint(BAT12Cog_model_E_all, level = 0.95)
                                           2.5 %        97.5 %
(Intercept)                         -1.099710512  3.6026207651
T1_BAT12_Cognitive                   0.449010544  0.6667782655
T1_PSS4                              0.020325988  0.2493066008
Age_2024                            -0.062503250  0.0678785003
T1_Gender_MWWoman                   -0.244292771  0.9631758415
T1_EducationMIUniversity (Bachelor) -0.694161683  0.8859011495
T1_EducationMIUniversity (Postgrad) -1.209771551  0.7120342870
T1_EducationMIVocational            -1.199987110  0.9503225264
T1_COPE_SelfDistraction             -0.251635442  0.1888952548
T1_COPE_ActiveCoping                -0.156116676  0.3411363693
T1_COPE_Denial                      -0.317002730  0.1835325982
T1_COPE_SubstanceUse                -0.213132919  0.3641773242
T1_COPE_UseOfEmotionalSupport       -0.045128962  0.5381152956
T1_COPE_BehavioralDisengagement     -0.258686530  0.2362115334
T1_COPE_Religion                    -0.180276321  0.1689247180
T1_COPE_Venting                      0.016412994  0.5290224997
T1_COPE_UseOfInstrumentalSupport    -0.493821904  0.0979065271
T1_COPE_PositiveReframing           -0.078683788  0.3536755720
T1_COPE_SelfBlame                   -0.114418560  0.2980416368
T1_COPE_Planning                    -0.436491334  0.0871290474
T1_COPE_Humor                       -0.216345316  0.1131989870
T1_COPE_Acceptance                  -0.175600906  0.2559653608
T1_CFS_Adaptive                     -0.043198363  0.2124342560
T1_CFS_Evaluation_new               -0.456292321 -0.0821607393
CST_switchcost.1                    -0.002708247  0.0006791938
Code
vif(BAT12Cog_model_E_all)
                                     GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Cognitive               1.379177  1        1.174384
T1_PSS4                          1.550783  1        1.245304
Age_2024                         1.680046  1        1.296166
T1_Gender_MW                     1.166430  1        1.080014
T1_EducationMI                   1.872269  3        1.110183
T1_COPE_SelfDistraction          1.581747  1        1.257675
T1_COPE_ActiveCoping             2.316626  1        1.522046
T1_COPE_Denial                   1.372773  1        1.171654
T1_COPE_SubstanceUse             1.207486  1        1.098857
T1_COPE_UseOfEmotionalSupport    3.273582  1        1.809304
T1_COPE_BehavioralDisengagement  1.324470  1        1.150856
T1_COPE_Religion                 1.301326  1        1.140757
T1_COPE_Venting                  1.824825  1        1.350861
T1_COPE_UseOfInstrumentalSupport 3.319871  1        1.822051
T1_COPE_PositiveReframing        1.880987  1        1.371491
T1_COPE_SelfBlame                1.681488  1        1.296722
T1_COPE_Planning                 2.668671  1        1.633607
T1_COPE_Humor                    1.316556  1        1.147413
T1_COPE_Acceptance               1.739907  1        1.319055
T1_CFS_Adaptive                  2.056368  1        1.434004
T1_CFS_Evaluation_new            1.848849  1        1.359724
CST_switchcost.1                 1.090075  1        1.044066
Code
plot(BAT12Cog_model_E_all, which = 1)

Code
bptest(BAT12Cog_model_E_all, ~ fitted(BAT12Cog_model_E_all) + I(fitted(BAT12Cog_model_E_all)^2))

    studentized Breusch-Pagan test

data:  BAT12Cog_model_E_all
BP = 0.91785, df = 2, p-value = 0.632
Code
# BAT12Emo_model_E_all <- lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
                           # + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse 
                           #     + T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + T1_COPE_Religion 
                           #     + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
                           #     + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance
                           #     + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1, data = df_CC)
BAT12Emo_model_E_all <- readRDS("BAT12Emo_model_E_all_final.RDS")
summary(BAT12Emo_model_E_all)

Call:
lm(formula = T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + T1_COPE_SelfDistraction + 
    T1_COPE_ActiveCoping + T1_COPE_Denial + T1_COPE_SubstanceUse + 
    T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + 
    T1_COPE_Religion + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + 
    T1_COPE_PositiveReframing + T1_COPE_SelfBlame + T1_COPE_Planning + 
    T1_COPE_Humor + T1_COPE_Acceptance + T1_CFS_Adaptive + T1_CFS_Evaluation_new + 
    CST_switchcost.1, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.5227 -1.2728 -0.3171  1.0147  5.9748 

Coefficients:
                                      Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          1.733e+00  1.132e+00   1.530   0.1274    
T1_BAT12_Emotion                     5.721e-01  6.687e-02   8.555 2.48e-15 ***
T1_PSS4                              1.004e-01  5.600e-02   1.793   0.0744 .  
Age_2024                            -5.227e-02  3.189e-02  -1.639   0.1026    
T1_Gender_MWWoman                    3.397e-01  2.920e-01   1.163   0.2460    
T1_EducationMIUniversity (Bachelor)  5.629e-01  3.835e-01   1.468   0.1437    
T1_EducationMIUniversity (Postgrad)  4.344e-01  4.676e-01   0.929   0.3539    
T1_EducationMIVocational             7.316e-01  5.240e-01   1.396   0.1642    
T1_COPE_SelfDistraction             -8.622e-02  1.064e-01  -0.811   0.4185    
T1_COPE_ActiveCoping                 9.157e-02  1.195e-01   0.766   0.4443    
T1_COPE_Denial                      -7.870e-02  1.232e-01  -0.639   0.5236    
T1_COPE_SubstanceUse                 3.122e-01  1.399e-01   2.232   0.0267 *  
T1_COPE_UseOfEmotionalSupport        5.655e-03  1.421e-01   0.040   0.9683    
T1_COPE_BehavioralDisengagement      5.054e-02  1.208e-01   0.418   0.6761    
T1_COPE_Religion                     2.383e-03  8.489e-02   0.028   0.9776    
T1_COPE_Venting                      1.689e-01  1.251e-01   1.350   0.1785    
T1_COPE_UseOfInstrumentalSupport     3.048e-02  1.450e-01   0.210   0.8337    
T1_COPE_PositiveReframing            6.835e-02  1.055e-01   0.648   0.5178    
T1_COPE_SelfBlame                    9.409e-02  1.001e-01   0.940   0.3485    
T1_COPE_Planning                    -1.396e-01  1.273e-01  -1.097   0.2739    
T1_COPE_Humor                        5.277e-02  7.979e-02   0.661   0.5091    
T1_COPE_Acceptance                  -1.014e-01  1.049e-01  -0.966   0.3352    
T1_CFS_Adaptive                     -5.984e-02  6.213e-02  -0.963   0.3366    
T1_CFS_Evaluation_new               -3.059e-04  9.098e-02  -0.003   0.9973    
CST_switchcost.1                    -3.462e-05  8.189e-04  -0.042   0.9663    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.956 on 210 degrees of freedom
Multiple R-squared:  0.458, Adjusted R-squared:  0.3961 
F-statistic: 7.395 on 24 and 210 DF,  p-value: < 2.2e-16
Code
confint(BAT12Emo_model_E_all, level = 0.95)
                                           2.5 %      97.5 %
(Intercept)                         -0.499137741 3.964313315
T1_BAT12_Emotion                     0.440244787 0.703896014
T1_PSS4                             -0.009968707 0.210801196
Age_2024                            -0.115125598 0.010586141
T1_Gender_MWWoman                   -0.235878831 0.915276514
T1_EducationMIUniversity (Bachelor) -0.193185802 1.318959667
T1_EducationMIUniversity (Postgrad) -0.487299072 1.356107974
T1_EducationMIVocational            -0.301430994 1.764633869
T1_COPE_SelfDistraction             -0.295906025 0.123456458
T1_COPE_ActiveCoping                -0.143977424 0.327117569
T1_COPE_Denial                      -0.321545329 0.164152485
T1_COPE_SubstanceUse                 0.036452554 0.587919083
T1_COPE_UseOfEmotionalSupport       -0.274544661 0.285855518
T1_COPE_BehavioralDisengagement     -0.187563313 0.288642173
T1_COPE_Religion                    -0.164968070 0.169733183
T1_COPE_Venting                     -0.077773785 0.415577971
T1_COPE_UseOfInstrumentalSupport    -0.255372849 0.316341832
T1_COPE_PositiveReframing           -0.139658818 0.276361972
T1_COPE_SelfBlame                   -0.103314392 0.291499913
T1_COPE_Planning                    -0.390466338 0.111259501
T1_COPE_Humor                       -0.104520802 0.210060230
T1_COPE_Acceptance                  -0.308227789 0.105516734
T1_CFS_Adaptive                     -0.182328476 0.062638866
T1_CFS_Evaluation_new               -0.179664194 0.179052394
CST_switchcost.1                    -0.001648906 0.001579661
Code
vif(BAT12Emo_model_E_all)
                                     GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Emotion                 1.411638  1        1.188124
T1_PSS4                          1.568515  1        1.252404
Age_2024                         1.699396  1        1.303609
T1_Gender_MW                     1.153534  1        1.074027
T1_EducationMI                   1.881709  3        1.111114
T1_COPE_SelfDistraction          1.559622  1        1.248848
T1_COPE_ActiveCoping             2.262420  1        1.504134
T1_COPE_Denial                   1.406426  1        1.185929
T1_COPE_SubstanceUse             1.198829  1        1.094910
T1_COPE_UseOfEmotionalSupport    3.288321  1        1.813373
T1_COPE_BehavioralDisengagement  1.334304  1        1.155121
T1_COPE_Religion                 1.300783  1        1.140519
T1_COPE_Venting                  1.839148  1        1.356152
T1_COPE_UseOfInstrumentalSupport 3.372022  1        1.836307
T1_COPE_PositiveReframing        1.894879  1        1.376546
T1_COPE_SelfBlame                1.676374  1        1.294749
T1_COPE_Planning                 2.665940  1        1.632771
T1_COPE_Humor                    1.305366  1        1.142526
T1_COPE_Acceptance               1.740007  1        1.319093
T1_CFS_Adaptive                  2.054661  1        1.433409
T1_CFS_Evaluation_new            1.849315  1        1.359895
CST_switchcost.1                 1.077426  1        1.037992
Code
plot(BAT12Emo_model_E_all, which = 1)

Code
bptest(BAT12Emo_model_E_all, ~ fitted(BAT12Emo_model_E_all) + I(fitted(BAT12Emo_model_E_all)^2))

    studentized Breusch-Pagan test

data:  BAT12Emo_model_E_all
BP = 4.0875, df = 2, p-value = 0.1295
Code
# BAT12Ment_model_E_all <- lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
                           # + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse 
                           #     + T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + T1_COPE_Religion 
                           #     + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
                           #     + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance
                           #     + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1, data = df_CC)
BAT12Ment_model_E_all <- readRDS("BAT12Ment_model_E_all_final.RDS")
summary(BAT12Ment_model_E_all)

Call:
lm(formula = T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + 
    T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_COPE_SelfDistraction + 
    T1_COPE_ActiveCoping + T1_COPE_Denial + T1_COPE_SubstanceUse + 
    T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + 
    T1_COPE_Religion + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + 
    T1_COPE_PositiveReframing + T1_COPE_SelfBlame + T1_COPE_Planning + 
    T1_COPE_Humor + T1_COPE_Acceptance + T1_CFS_Adaptive + T1_CFS_Evaluation_new + 
    CST_switchcost.1, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-5.9332 -1.1424 -0.0908  1.1059  6.1761 

Coefficients:
                                      Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          1.3032527  1.1554743   1.128   0.2607    
T1_BAT12_MentalDistance              0.6232365  0.0627125   9.938   <2e-16 ***
T1_PSS4                              0.1256695  0.0623167   2.017   0.0450 *  
Age_2024                            -0.0089111  0.0328467  -0.271   0.7864    
T1_Gender_MWWoman                   -0.2683889  0.2975835  -0.902   0.3681    
T1_EducationMIUniversity (Bachelor)  0.2601732  0.3931069   0.662   0.5088    
T1_EducationMIUniversity (Postgrad) -0.2102442  0.4811193  -0.437   0.6626    
T1_EducationMIVocational             0.0479375  0.5343748   0.090   0.9286    
T1_COPE_SelfDistraction             -0.0718239  0.1085156  -0.662   0.5088    
T1_COPE_ActiveCoping                 0.1161578  0.1226097   0.947   0.3445    
T1_COPE_Denial                      -0.1230508  0.1243944  -0.989   0.3237    
T1_COPE_SubstanceUse                 0.2812531  0.1427010   1.971   0.0500 .  
T1_COPE_UseOfEmotionalSupport        0.1580244  0.1451039   1.089   0.2774    
T1_COPE_BehavioralDisengagement      0.3056185  0.1230126   2.484   0.0138 *  
T1_COPE_Religion                    -0.1214317  0.0866069  -1.402   0.1624    
T1_COPE_Venting                      0.0699020  0.1281076   0.546   0.5859    
T1_COPE_UseOfInstrumentalSupport    -0.0330153  0.1474750  -0.224   0.8231    
T1_COPE_PositiveReframing            0.0182450  0.1078202   0.169   0.8658    
T1_COPE_SelfBlame                    0.1318255  0.1028565   1.282   0.2014    
T1_COPE_Planning                    -0.1263527  0.1300447  -0.972   0.3324    
T1_COPE_Humor                       -0.1589688  0.0812185  -1.957   0.0516 .  
T1_COPE_Acceptance                  -0.0414531  0.1072739  -0.386   0.6996    
T1_CFS_Adaptive                      0.1008122  0.0635029   1.588   0.1139    
T1_CFS_Evaluation_new               -0.1403762  0.0930106  -1.509   0.1327    
CST_switchcost.1                    -0.0001799  0.0008377  -0.215   0.8302    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.999 on 210 degrees of freedom
Multiple R-squared:  0.5375,    Adjusted R-squared:  0.4847 
F-statistic: 10.17 on 24 and 210 DF,  p-value: < 2.2e-16
Code
confint(BAT12Ment_model_E_all, level = 0.95)
                                            2.5 %      97.5 %
(Intercept)                         -9.745624e-01 3.581067706
T1_BAT12_MentalDistance              4.996098e-01 0.746863188
T1_PSS4                              2.823119e-03 0.248515966
Age_2024                            -7.366272e-02 0.055840459
T1_Gender_MWWoman                   -8.550227e-01 0.318244939
T1_EducationMIUniversity (Bachelor) -5.147681e-01 1.035114608
T1_EducationMIUniversity (Postgrad) -1.158687e+00 0.738198155
T1_EducationMIVocational            -1.005489e+00 1.101363815
T1_COPE_SelfDistraction             -2.857434e-01 0.142095498
T1_COPE_ActiveCoping                -1.255458e-01 0.357861395
T1_COPE_Denial                      -3.682725e-01 0.122170989
T1_COPE_SubstanceUse                -5.683962e-05 0.562563113
T1_COPE_UseOfEmotionalSupport       -1.280225e-01 0.444071290
T1_COPE_BehavioralDisengagement      6.312078e-02 0.548116258
T1_COPE_Religion                    -2.921621e-01 0.049298696
T1_COPE_Venting                     -1.826397e-01 0.322443752
T1_COPE_UseOfInstrumentalSupport    -3.237365e-01 0.257705885
T1_COPE_PositiveReframing           -1.943037e-01 0.230793619
T1_COPE_SelfBlame                   -7.093801e-02 0.334589097
T1_COPE_Planning                    -3.827131e-01 0.130007751
T1_COPE_Humor                       -3.190768e-01 0.001139209
T1_COPE_Acceptance                  -2.529248e-01 0.170018615
T1_CFS_Adaptive                     -2.437267e-02 0.225997030
T1_CFS_Evaluation_new               -3.237303e-01 0.042977925
CST_switchcost.1                    -1.831379e-03 0.001471527
Code
vif(BAT12Ment_model_E_all)
                                     GVIF Df GVIF^(1/(2*Df))
T1_BAT12_MentalDistance          1.583074  1        1.258203
T1_PSS4                          1.860622  1        1.364046
Age_2024                         1.727301  1        1.314268
T1_Gender_MW                     1.147680  1        1.071298
T1_EducationMI                   1.891703  3        1.112096
T1_COPE_SelfDistraction          1.554765  1        1.246902
T1_COPE_ActiveCoping             2.281638  1        1.510509
T1_COPE_Denial                   1.373495  1        1.171962
T1_COPE_SubstanceUse             1.195125  1        1.093218
T1_COPE_UseOfEmotionalSupport    3.282285  1        1.811708
T1_COPE_BehavioralDisengagement  1.325579  1        1.151338
T1_COPE_Religion                 1.296691  1        1.138723
T1_COPE_Venting                  1.846264  1        1.358773
T1_COPE_UseOfInstrumentalSupport 3.340483  1        1.827699
T1_COPE_PositiveReframing        1.894926  1        1.376563
T1_COPE_SelfBlame                1.693906  1        1.301501
T1_COPE_Planning                 2.666513  1        1.632946
T1_COPE_Humor                    1.295441  1        1.138174
T1_COPE_Acceptance               1.741467  1        1.319646
T1_CFS_Adaptive                  2.055661  1        1.433758
T1_CFS_Evaluation_new            1.851030  1        1.360526
CST_switchcost.1                 1.080003  1        1.039232
Code
plot(BAT12Ment_model_E_all, which = 1)

Code
bptest(BAT12Ment_model_E_all, ~ fitted(BAT12Ment_model_E_all) + I(fitted(BAT12Ment_model_E_all)^2))

    studentized Breusch-Pagan test

data:  BAT12Ment_model_E_all
BP = 0.39311, df = 2, p-value = 0.8216
Code
# BAT12Exh_model_E_all <- lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
                            # + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse 
                            #    + T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + T1_COPE_Religion 
                            #    + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
                            #    + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance
                            #    + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1, data = df_CC)
BAT12Exh_model_E_all <- readRDS("BAT12Exh_model_E_all_final.RDS")
summary(BAT12Exh_model_E_all)

Call:
lm(formula = T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + T1_COPE_SelfDistraction + 
    T1_COPE_ActiveCoping + T1_COPE_Denial + T1_COPE_SubstanceUse + 
    T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + 
    T1_COPE_Religion + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + 
    T1_COPE_PositiveReframing + T1_COPE_SelfBlame + T1_COPE_Planning + 
    T1_COPE_Humor + T1_COPE_Acceptance + T1_CFS_Adaptive + T1_CFS_Evaluation_new + 
    CST_switchcost.1, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-5.0561 -0.9818  0.0194  1.1429  4.9381 

Coefficients:
                                      Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          2.4506756  1.1242064   2.180 0.030376 *  
T1_BAT12_Exhaustion                  0.4916198  0.0571702   8.599 1.86e-15 ***
T1_PSS4                              0.0819061  0.0578958   1.415 0.158633    
Age_2024                            -0.0414852  0.0310293  -1.337 0.182679    
T1_Gender_MWWoman                    0.2712856  0.2883469   0.941 0.347873    
T1_EducationMIUniversity (Bachelor)  0.3429528  0.3759865   0.912 0.362740    
T1_EducationMIUniversity (Postgrad)  0.1187885  0.4610391   0.258 0.796926    
T1_EducationMIVocational             0.4781800  0.5120525   0.934 0.351454    
T1_COPE_SelfDistraction              0.1458829  0.1040362   1.402 0.162323    
T1_COPE_ActiveCoping                 0.0567287  0.1180309   0.481 0.631283    
T1_COPE_Denial                      -0.1341791  0.1191724  -1.126 0.261483    
T1_COPE_SubstanceUse                -0.0101803  0.1367774  -0.074 0.940740    
T1_COPE_UseOfEmotionalSupport        0.0189745  0.1387475   0.137 0.891355    
T1_COPE_BehavioralDisengagement      0.4363751  0.1180141   3.698 0.000278 ***
T1_COPE_Religion                    -0.0990236  0.0830269  -1.193 0.234345    
T1_COPE_Venting                      0.0954254  0.1221026   0.782 0.435378    
T1_COPE_UseOfInstrumentalSupport    -0.0701432  0.1411857  -0.497 0.619839    
T1_COPE_PositiveReframing           -0.0527333  0.1029144  -0.512 0.608910    
T1_COPE_SelfBlame                    0.1084915  0.0982670   1.104 0.270836    
T1_COPE_Planning                    -0.0218344  0.1246901  -0.175 0.861163    
T1_COPE_Humor                       -0.0210907  0.0774414  -0.272 0.785625    
T1_COPE_Acceptance                  -0.0440286  0.1029295  -0.428 0.669268    
T1_CFS_Adaptive                      0.1406769  0.0610907   2.303 0.022272 *  
T1_CFS_Evaluation_new               -0.1326517  0.0895599  -1.481 0.140065    
CST_switchcost.1                     0.0001720  0.0008031   0.214 0.830608    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.916 on 210 degrees of freedom
Multiple R-squared:  0.5107,    Adjusted R-squared:  0.4548 
F-statistic: 9.132 on 24 and 210 DF,  p-value: < 2.2e-16
Code
confint(BAT12Exh_model_E_all, level = 0.95)
                                           2.5 %      97.5 %
(Intercept)                          0.234499604 4.666851626
T1_BAT12_Exhaustion                  0.378918751 0.604320828
T1_PSS4                             -0.032225228 0.196037444
Age_2024                            -0.102653894 0.019683568
T1_Gender_MWWoman                   -0.297139844 0.839711066
T1_EducationMIUniversity (Bachelor) -0.398238814 1.084144390
T1_EducationMIUniversity (Postgrad) -0.790069313 1.027646302
T1_EducationMIVocational            -0.531241725 1.487601690
T1_COPE_SelfDistraction             -0.059206296 0.350972046
T1_COPE_ActiveCoping                -0.175948514 0.289406008
T1_COPE_Denial                      -0.369106672 0.100748456
T1_COPE_SubstanceUse                -0.279812992 0.259452482
T1_COPE_UseOfEmotionalSupport       -0.254541943 0.292490901
T1_COPE_BehavioralDisengagement      0.203731029 0.669019192
T1_COPE_Religion                    -0.262696546 0.064649405
T1_COPE_Venting                     -0.145278520 0.336129256
T1_COPE_UseOfInstrumentalSupport    -0.348466127 0.208179686
T1_COPE_PositiveReframing           -0.255610931 0.150144361
T1_COPE_SelfBlame                   -0.085224740 0.302207658
T1_COPE_Planning                    -0.267638968 0.223970242
T1_COPE_Humor                       -0.173752841 0.131571493
T1_COPE_Acceptance                  -0.246936170 0.158878901
T1_CFS_Adaptive                      0.020247388 0.261106452
T1_CFS_Evaluation_new               -0.309203271 0.043899864
CST_switchcost.1                    -0.001411236 0.001755284
Code
vif(BAT12Exh_model_E_all)
                                     GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Exhaustion              1.467404  1        1.211365
T1_PSS4                          1.748104  1        1.322159
Age_2024                         1.677840  1        1.295314
T1_Gender_MW                     1.172892  1        1.083001
T1_EducationMI                   1.894183  3        1.112339
T1_COPE_SelfDistraction          1.555515  1        1.247203
T1_COPE_ActiveCoping             2.301509  1        1.517073
T1_COPE_Denial                   1.372149  1        1.171388
T1_COPE_SubstanceUse             1.195123  1        1.093217
T1_COPE_UseOfEmotionalSupport    3.266578  1        1.807368
T1_COPE_BehavioralDisengagement  1.328002  1        1.152389
T1_COPE_Religion                 1.297158  1        1.138928
T1_COPE_Venting                  1.825652  1        1.351167
T1_COPE_UseOfInstrumentalSupport 3.332561  1        1.825530
T1_COPE_PositiveReframing        1.879180  1        1.370832
T1_COPE_SelfBlame                1.682928  1        1.297277
T1_COPE_Planning                 2.668369  1        1.633514
T1_COPE_Humor                    1.281972  1        1.132242
T1_COPE_Acceptance               1.745144  1        1.321039
T1_CFS_Adaptive                  2.070801  1        1.439028
T1_CFS_Evaluation_new            1.868098  1        1.366784
CST_switchcost.1                 1.080491  1        1.039467
Code
plot(BAT12Exh_model_E_all, which = 1)

Code
bptest(BAT12Exh_model_E_all, ~ fitted(BAT12Exh_model_E_all) + I(fitted(BAT12Exh_model_E_all)^2))

    studentized Breusch-Pagan test

data:  BAT12Exh_model_E_all
BP = 0.72458, df = 2, p-value = 0.6961
Code
##MODEL COMPARISONS COMPLETE CASES
anova(BAT12Cog_model_A_Cov, BAT12Cog_model_B_ERall)
Analysis of Variance Table

Model 1: T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + 
    T1_Gender_MW + T1_EducationMI
Model 2: T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + 
    T1_Gender_MW + T1_EducationMI + T1_COPE_SelfDistraction + 
    T1_COPE_ActiveCoping + T1_COPE_Denial + T1_COPE_SubstanceUse + 
    T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + 
    T1_COPE_Religion + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + 
    T1_COPE_PositiveReframing + T1_COPE_SelfBlame + T1_COPE_Planning + 
    T1_COPE_Humor + T1_COPE_Acceptance
  Res.Df    RSS Df Sum of Sq      F Pr(>F)
1    227 966.91                           
2    213 914.82 14    52.091 0.8663 0.5963
Code
anova(BAT12Cog_model_A_Cov, BAT12Cog_model_C_CST)
Analysis of Variance Table

Model 1: T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + 
    T1_Gender_MW + T1_EducationMI
Model 2: T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + 
    T1_Gender_MW + T1_EducationMI + CST_switchcost.1
  Res.Df    RSS Df Sum of Sq      F Pr(>F)
1    227 966.91                           
2    226 963.13  1    3.7799 0.8869 0.3473
Code
anova(BAT12Cog_model_A_Cov, BAT12Cog_model_D_CFS)
Analysis of Variance Table

Model 1: T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + 
    T1_Gender_MW + T1_EducationMI
Model 2: T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + 
    T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new
  Res.Df    RSS Df Sum of Sq      F  Pr(>F)  
1    227 966.91                              
2    225 946.90  2    20.017 2.3782 0.09505 .
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
anova(BAT12Cog_model_A_Cov, BAT12Cog_model_E_all)
Analysis of Variance Table

Model 1: T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + 
    T1_Gender_MW + T1_EducationMI
Model 2: T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + 
    T1_Gender_MW + T1_EducationMI + T1_COPE_SelfDistraction + 
    T1_COPE_ActiveCoping + T1_COPE_Denial + T1_COPE_SubstanceUse + 
    T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + 
    T1_COPE_Religion + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + 
    T1_COPE_PositiveReframing + T1_COPE_SelfBlame + T1_COPE_Planning + 
    T1_COPE_Humor + T1_COPE_Acceptance + T1_CFS_Adaptive + T1_CFS_Evaluation_new + 
    CST_switchcost.1
  Res.Df    RSS Df Sum of Sq      F Pr(>F)
1    227 966.91                           
2    210 874.21 17    92.704 1.3099 0.1882
Code
anova(BAT12Emo_model_A_Cov, BAT12Emo_model_B_ERall)
Analysis of Variance Table

Model 1: T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + 
    T1_EducationMI
Model 2: T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + 
    T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping + 
    T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport + 
    T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting + 
    T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing + 
    T1_COPE_SelfBlame + T1_COPE_Planning + T1_COPE_Humor + T1_COPE_Acceptance
  Res.Df    RSS Df Sum of Sq      F Pr(>F)
1    227 866.39                           
2    213 808.39 14    58.004 1.0917 0.3666
Code
anova(BAT12Emo_model_A_Cov, BAT12Emo_model_C_CST)
Analysis of Variance Table

Model 1: T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + 
    T1_EducationMI
Model 2: T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + 
    T1_EducationMI + CST_switchcost.1
  Res.Df    RSS Df Sum of Sq      F Pr(>F)
1    227 866.39                           
2    226 866.34  1  0.051445 0.0134 0.9079
Code
anova(BAT12Emo_model_A_Cov, BAT12Emo_model_D_CFS)
Analysis of Variance Table

Model 1: T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + 
    T1_EducationMI
Model 2: T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + 
    T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new
  Res.Df    RSS Df Sum of Sq      F Pr(>F)
1    227 866.39                           
2    225 859.68  2    6.7116 0.8783 0.4169
Code
anova(BAT12Emo_model_A_Cov, BAT12Emo_model_E_all)
Analysis of Variance Table

Model 1: T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + 
    T1_EducationMI
Model 2: T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + 
    T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping + 
    T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport + 
    T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting + 
    T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing + 
    T1_COPE_SelfBlame + T1_COPE_Planning + T1_COPE_Humor + T1_COPE_Acceptance + 
    T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1
  Res.Df    RSS Df Sum of Sq      F Pr(>F)
1    227 866.39                           
2    210 803.45 17    62.938 0.9677  0.496
Code
anova(BAT12Ment_model_A_Cov, BAT12Ment_model_B_ERall)
Analysis of Variance Table

Model 1: T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI
Model 2: T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + T1_COPE_SelfDistraction + 
    T1_COPE_ActiveCoping + T1_COPE_Denial + T1_COPE_SubstanceUse + 
    T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + 
    T1_COPE_Religion + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + 
    T1_COPE_PositiveReframing + T1_COPE_SelfBlame + T1_COPE_Planning + 
    T1_COPE_Humor + T1_COPE_Acceptance
  Res.Df    RSS Df Sum of Sq      F  Pr(>F)  
1    227 942.03                              
2    213 851.73 14    90.306 1.6131 0.07737 .
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
anova(BAT12Ment_model_A_Cov, BAT12Ment_model_C_CST)
Analysis of Variance Table

Model 1: T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI
Model 2: T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1
  Res.Df    RSS Df Sum of Sq      F Pr(>F)
1    227 942.03                           
2    226 942.02  1   0.01458 0.0035 0.9529
Code
anova(BAT12Ment_model_A_Cov, BAT12Ment_model_D_CFS)
Analysis of Variance Table

Model 1: T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI
Model 2: T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + 
    T1_CFS_Evaluation_new
  Res.Df    RSS Df Sum of Sq      F Pr(>F)
1    227 942.03                           
2    225 934.01  2    8.0249 0.9666  0.382
Code
anova(BAT12Ment_model_A_Cov, BAT12Ment_model_E_all)
Analysis of Variance Table

Model 1: T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI
Model 2: T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + T1_COPE_SelfDistraction + 
    T1_COPE_ActiveCoping + T1_COPE_Denial + T1_COPE_SubstanceUse + 
    T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + 
    T1_COPE_Religion + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + 
    T1_COPE_PositiveReframing + T1_COPE_SelfBlame + T1_COPE_Planning + 
    T1_COPE_Humor + T1_COPE_Acceptance + T1_CFS_Adaptive + T1_CFS_Evaluation_new + 
    CST_switchcost.1
  Res.Df    RSS Df Sum of Sq      F  Pr(>F)  
1    227 942.03                              
2    210 838.87 17    103.16 1.5191 0.09007 .
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
anova(BAT12Exh_model_A_Cov, BAT12Exh_model_B_ERall)
Analysis of Variance Table

Model 1: T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + 
    T1_Gender_MW + T1_EducationMI
Model 2: T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + 
    T1_Gender_MW + T1_EducationMI + T1_COPE_SelfDistraction + 
    T1_COPE_ActiveCoping + T1_COPE_Denial + T1_COPE_SubstanceUse + 
    T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + 
    T1_COPE_Religion + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + 
    T1_COPE_PositiveReframing + T1_COPE_SelfBlame + T1_COPE_Planning + 
    T1_COPE_Humor + T1_COPE_Acceptance
  Res.Df    RSS Df Sum of Sq      F Pr(>F)  
1    227 884.10                             
2    213 790.57 14    93.528 1.7999 0.0401 *
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
anova(BAT12Exh_model_A_Cov, BAT12Exh_model_C_CST)
Analysis of Variance Table

Model 1: T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + 
    T1_Gender_MW + T1_EducationMI
Model 2: T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + 
    T1_Gender_MW + T1_EducationMI + CST_switchcost.1
  Res.Df    RSS Df Sum of Sq      F Pr(>F)
1    227 884.10                           
2    226 882.57  1    1.5239 0.3902 0.5328
Code
anova(BAT12Exh_model_A_Cov, BAT12Exh_model_D_CFS)
Analysis of Variance Table

Model 1: T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + 
    T1_Gender_MW + T1_EducationMI
Model 2: T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + 
    T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new
  Res.Df    RSS Df Sum of Sq      F  Pr(>F)  
1    227 884.10                              
2    225 864.87  2    19.233 2.5018 0.08422 .
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
anova(BAT12Exh_model_A_Cov, BAT12Exh_model_E_all)
Analysis of Variance Table

Model 1: T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + 
    T1_Gender_MW + T1_EducationMI
Model 2: T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + 
    T1_Gender_MW + T1_EducationMI + T1_COPE_SelfDistraction + 
    T1_COPE_ActiveCoping + T1_COPE_Denial + T1_COPE_SubstanceUse + 
    T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + 
    T1_COPE_Religion + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + 
    T1_COPE_PositiveReframing + T1_COPE_SelfBlame + T1_COPE_Planning + 
    T1_COPE_Humor + T1_COPE_Acceptance + T1_CFS_Adaptive + T1_CFS_Evaluation_new + 
    CST_switchcost.1
  Res.Df    RSS Df Sum of Sq     F Pr(>F)  
1    227 884.10                            
2    210 770.68 17    113.42 1.818 0.0275 *
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

##Complete Case Analysis Checks with CFS Evaluation

Code
#Testing Model D, CFS Evaluation with the 5 items (reverse scored)
#Model D - Coping Flex CFS

BAT12Cog_model_D_CFS_evalcheck <- readRDS("BAT12Cog_model_D_CFS_evalcheck.RDS")
# BAT12Cog_model_D_CFS_evalcheck <- lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation, data = df_CC)
summary(BAT12Cog_model_D_CFS_evalcheck)

Call:
lm(formula = T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + 
    T1_CFS_Evaluation, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.9966 -1.2651 -0.1625  1.4237  5.6943 

Coefficients:
                                     Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          3.134969   1.111555   2.820  0.00523 ** 
T1_BAT12_Cognitive                   0.538639   0.052726  10.216  < 2e-16 ***
T1_PSS4                              0.126153   0.052518   2.402  0.01711 *  
Age_2024                             0.001154   0.031607   0.037  0.97090    
T1_Gender_MWWoman                    0.519603   0.286291   1.815  0.07086 .  
T1_EducationMIUniversity (Bachelor)  0.129160   0.388014   0.333  0.73954    
T1_EducationMIUniversity (Postgrad) -0.110318   0.472031  -0.234  0.81542    
T1_EducationMIVocational            -0.197182   0.532689  -0.370  0.71161    
T1_CFS_Adaptive                      0.095013   0.052485   1.810  0.07158 .  
T1_CFS_Evaluation                   -0.180165   0.061470  -2.931  0.00373 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.034 on 225 degrees of freedom
Multiple R-squared:  0.4732,    Adjusted R-squared:  0.4522 
F-statistic: 22.46 on 9 and 225 DF,  p-value: < 2.2e-16
Code
confint(BAT12Cog_model_D_CFS_evalcheck, level = 0.95)
                                           2.5 %      97.5 %
(Intercept)                          0.944580646  5.32535787
T1_BAT12_Cognitive                   0.434740392  0.64253845
T1_PSS4                              0.022663157  0.22964233
Age_2024                            -0.061129883  0.06343810
T1_Gender_MWWoman                   -0.044550636  1.08375718
T1_EducationMIUniversity (Bachelor) -0.635445579  0.89376607
T1_EducationMIUniversity (Postgrad) -1.040484508  0.81984818
T1_EducationMIVocational            -1.246878803  0.85251518
T1_CFS_Adaptive                     -0.008411257  0.19843739
T1_CFS_Evaluation                   -0.301296118 -0.05903403
Code
vif(BAT12Cog_model_D_CFS_evalcheck)
                       GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Cognitive 1.265176  1        1.124800
T1_PSS4            1.276562  1        1.129850
Age_2024           1.545024  1        1.242990
T1_Gender_MW       1.026118  1        1.012975
T1_EducationMI     1.595234  3        1.080946
T1_CFS_Adaptive    1.356465  1        1.164674
T1_CFS_Evaluation  1.395908  1        1.181485
Code
plot(BAT12Cog_model_D_CFS_evalcheck, which = 1)

Code
bptest(BAT12Cog_model_D_CFS_evalcheck, ~ fitted(BAT12Cog_model_D_CFS_evalcheck) + I(fitted(BAT12Cog_model_D_CFS_evalcheck)^2))

    studentized Breusch-Pagan test

data:  BAT12Cog_model_D_CFS_evalcheck
BP = 0.86135, df = 2, p-value = 0.6501
Code
BAT12Emo_model_D_CFS_evalcheck <- readRDS("BAT12Emo_model_D_CFS_evalcheck.RDS")
# BAT12Emo_model_D_CFS_evalcheck <- lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation, data = df_CC)
summary(BAT12Emo_model_D_CFS_evalcheck)

Call:
lm(formula = T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + 
    T1_CFS_Evaluation, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.3981 -1.3274 -0.4042  1.0902  6.1317 

Coefficients:
                                    Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          3.10343    1.02053   3.041  0.00264 ** 
T1_BAT12_Emotion                     0.60481    0.06236   9.698  < 2e-16 ***
T1_PSS4                              0.11744    0.05045   2.328  0.02081 *  
Age_2024                            -0.05891    0.03045  -1.935  0.05427 .  
T1_Gender_MWWoman                    0.33337    0.27496   1.212  0.22662    
T1_EducationMIUniversity (Bachelor)  0.60566    0.37188   1.629  0.10479    
T1_EducationMIUniversity (Postgrad)  0.48005    0.45287   1.060  0.29028    
T1_EducationMIVocational             0.76203    0.51219   1.488  0.13821    
T1_CFS_Adaptive                     -0.03586    0.05008  -0.716  0.47478    
T1_CFS_Evaluation                   -0.05578    0.05812  -0.960  0.33825    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.951 on 225 degrees of freedom
Multiple R-squared:  0.4223,    Adjusted R-squared:  0.3992 
F-statistic: 18.28 on 9 and 225 DF,  p-value: < 2.2e-16
Code
confint(BAT12Emo_model_D_CFS_evalcheck, level = 0.95)
                                          2.5 %      97.5 %
(Intercept)                          1.09242015 5.114445934
T1_BAT12_Emotion                     0.48191973 0.727696810
T1_PSS4                              0.01802348 0.216860970
Age_2024                            -0.11891495 0.001088444
T1_Gender_MWWoman                   -0.20845200 0.875183741
T1_EducationMIUniversity (Bachelor) -0.12715758 1.338468771
T1_EducationMIUniversity (Postgrad) -0.41236693 1.372468701
T1_EducationMIVocational            -0.24727317 1.771334613
T1_CFS_Adaptive                     -0.13455129 0.062837657
T1_CFS_Evaluation                   -0.17030609 0.058753184
Code
vif(BAT12Emo_model_D_CFS_evalcheck)
                      GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Emotion  1.234041  1        1.110874
T1_PSS4           1.279937  1        1.131343
Age_2024          1.557805  1        1.248121
T1_Gender_MW      1.028282  1        1.014042
T1_EducationMI    1.594321  3        1.080843
T1_CFS_Adaptive   1.342000  1        1.158447
T1_CFS_Evaluation 1.355768  1        1.164374
Code
plot(BAT12Emo_model_D_CFS_evalcheck, which = 1)

Code
bptest(BAT12Emo_model_D_CFS_evalcheck, ~ fitted(BAT12Emo_model_D_CFS_evalcheck) + I(fitted(BAT12Emo_model_D_CFS_evalcheck)^2))

    studentized Breusch-Pagan test

data:  BAT12Emo_model_D_CFS_evalcheck
BP = 3.3475, df = 2, p-value = 0.1875
Code
BAT12Ment_model_D_CFS_evalcheck <- readRDS("BAT12Ment_model_D_CFS_evalcheck.RDS")
# BAT12Ment_model_D_CFS_evalcheck <- lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation, data = df_CC)
summary(BAT12Ment_model_D_CFS_evalcheck)

Call:
lm(formula = T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + 
    T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + 
    T1_CFS_Evaluation, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-6.0284 -1.2487  0.1151  1.1711  7.9518 

Coefficients:
                                     Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          3.155517   1.048134   3.011  0.00290 ** 
T1_BAT12_MentalDistance              0.619265   0.060592  10.220  < 2e-16 ***
T1_PSS4                              0.131624   0.056663   2.323  0.02108 *  
Age_2024                            -0.008001   0.031483  -0.254  0.79963    
T1_Gender_MWWoman                   -0.029458   0.280514  -0.105  0.91646    
T1_EducationMIUniversity (Bachelor)  0.260157   0.381275   0.682  0.49573    
T1_EducationMIUniversity (Postgrad) -0.182662   0.466483  -0.392  0.69574    
T1_EducationMIVocational             0.125786   0.523850   0.240  0.81046    
T1_CFS_Adaptive                      0.095286   0.051658   1.845  0.06642 .  
T1_CFS_Evaluation                   -0.194049   0.059660  -3.253  0.00132 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.999 on 225 degrees of freedom
Multiple R-squared:  0.5043,    Adjusted R-squared:  0.4844 
F-statistic: 25.43 on 9 and 225 DF,  p-value: < 2.2e-16
Code
confint(BAT12Ment_model_D_CFS_evalcheck, level = 0.95)
                                           2.5 %      97.5 %
(Intercept)                          1.090102210  5.22093260
T1_BAT12_MentalDistance              0.499864691  0.73866519
T1_PSS4                              0.019965700  0.24328257
Age_2024                            -0.070040234  0.05403905
T1_Gender_MWWoman                   -0.582228696  0.52331257
T1_EducationMIUniversity (Bachelor) -0.491168146  1.01148303
T1_EducationMIUniversity (Postgrad) -1.101895141  0.73657191
T1_EducationMIVocational            -0.906494850  1.15806592
T1_CFS_Adaptive                     -0.006509898  0.19708115
T1_CFS_Evaluation                   -0.311613775 -0.07648468
Code
vif(BAT12Ment_model_D_CFS_evalcheck)
                            GVIF Df GVIF^(1/(2*Df))
T1_BAT12_MentalDistance 1.477138  1        1.215375
T1_PSS4                 1.537624  1        1.240010
Age_2024                1.586133  1        1.259418
T1_Gender_MW            1.019320  1        1.009614
T1_EducationMI          1.600327  3        1.081521
T1_CFS_Adaptive         1.359688  1        1.166056
T1_CFS_Evaluation       1.360558  1        1.166430
Code
plot(BAT12Ment_model_D_CFS_evalcheck, which = 1)

Code
bptest(BAT12Ment_model_D_CFS_evalcheck, ~ fitted(BAT12Ment_model_D_CFS_evalcheck) + I(fitted(BAT12Ment_model_D_CFS_evalcheck)^2))

    studentized Breusch-Pagan test

data:  BAT12Ment_model_D_CFS_evalcheck
BP = 1.8142, df = 2, p-value = 0.4037
Code
BAT12Exh_model_D_CFS_evalcheck <- readRDS("BAT12Exh_model_D_CFS_evalcheck.RDS")
# BAT12Exh_model_D_CFS_evalcheck <- lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation, data = df_CC)
summary(BAT12Exh_model_D_CFS_evalcheck)

Call:
lm(formula = T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + 
    Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + 
    T1_CFS_Evaluation, data = df_CC)

Residuals:
    Min      1Q  Median      3Q     Max 
-5.9726 -1.1195  0.0364  1.1337  4.7384 

Coefficients:
                                    Estimate Std. Error t value Pr(>|t|)    
(Intercept)                          4.56042    1.04212   4.376 1.85e-05 ***
T1_BAT12_Exhaustion                  0.50770    0.05595   9.075  < 2e-16 ***
T1_PSS4                              0.13053    0.05253   2.485 0.013684 *  
Age_2024                            -0.04595    0.02988  -1.538 0.125467    
T1_Gender_MWWoman                    0.48992    0.27290   1.795 0.073956 .  
T1_EducationMIUniversity (Bachelor)  0.26878    0.36640   0.734 0.463968    
T1_EducationMIUniversity (Postgrad)  0.13843    0.44890   0.308 0.758086    
T1_EducationMIVocational             0.48609    0.50397   0.965 0.335818    
T1_CFS_Adaptive                      0.14856    0.05000   2.971 0.003286 ** 
T1_CFS_Evaluation                   -0.19398    0.05746  -3.376 0.000867 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.924 on 225 degrees of freedom
Multiple R-squared:  0.4713,    Adjusted R-squared:  0.4501 
F-statistic: 22.28 on 9 and 225 DF,  p-value: < 2.2e-16
Code
confint(BAT12Exh_model_D_CFS_evalcheck, level = 0.95)
                                          2.5 %      97.5 %
(Intercept)                          2.50684858  6.61398871
T1_BAT12_Exhaustion                  0.39745067  0.61794447
T1_PSS4                              0.02702197  0.23404053
Age_2024                            -0.10481958  0.01292480
T1_Gender_MWWoman                   -0.04784357  1.02768896
T1_EducationMIUniversity (Bachelor) -0.45323099  0.99079995
T1_EducationMIUniversity (Postgrad) -0.74616567  1.02302312
T1_EducationMIVocational            -0.50700879  1.47918366
T1_CFS_Adaptive                      0.05004013  0.24707904
T1_CFS_Evaluation                   -0.30722135 -0.08074849
Code
vif(BAT12Exh_model_D_CFS_evalcheck)
                        GVIF Df GVIF^(1/(2*Df))
T1_BAT12_Exhaustion 1.393415  1        1.180430
T1_PSS4             1.426822  1        1.194497
Age_2024            1.542289  1        1.241889
T1_Gender_MW        1.041722  1        1.020648
T1_EducationMI      1.602814  3        1.081801
T1_CFS_Adaptive     1.375214  1        1.172695
T1_CFS_Evaluation   1.362954  1        1.167456
Code
plot(BAT12Exh_model_D_CFS_evalcheck, which = 1)

Code
bptest(BAT12Exh_model_D_CFS_evalcheck, ~ fitted(BAT12Exh_model_D_CFS_evalcheck) + I(fitted(BAT12Exh_model_D_CFS_evalcheck)^2))

    studentized Breusch-Pagan test

data:  BAT12Exh_model_D_CFS_evalcheck
BP = 2.5712, df = 2, p-value = 0.2765

8 MI Analysis

Code
imp <- readRDS("imp_090725_83.rds")

#MI Model A - Covariates
# BAT12Cog_MImodel_A_Cov <- with(imp, lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI))
BAT12Cog_MImodel_A_Cov <- readRDS("BAT12Cog_MImodel_A_Cov_final.RDS")
summary(pool(BAT12Cog_MImodel_A_Cov))
                                 term    estimate  std.error  statistic
1                         (Intercept)  2.61254625 0.92626049  2.8205308
2                  T1_BAT12_Cognitive  0.56967672 0.05662955 10.0597086
3                             T1_PSS4  0.11863438 0.05852065  2.0272226
4                            Age_2024 -0.01228951 0.03062502 -0.4012899
5                   T1_Gender_MWWoman  0.38869573 0.29333238  1.3251034
6 T1_EducationMIUniversity (Bachelor)  0.15964365 0.41784125  0.3820677
7 T1_EducationMIUniversity (Postgrad) -0.08322826 0.47536829 -0.1750816
8            T1_EducationMIVocational -0.24959372 0.52355488 -0.4767289
         df      p.value
1 125.86377 5.572282e-03
2  96.29151 1.073408e-16
3  77.78493 4.606548e-02
4 189.07895 6.886599e-01
5 119.16936 1.876719e-01
6  91.55326 7.032966e-01
7 132.19355 8.612834e-01
8 188.95376 6.341061e-01
Code
pool.r.squared(BAT12Cog_MImodel_A_Cov)
         est     lo 95     hi 95       fmi
R^2 0.420858 0.3230812 0.5138256 0.3039238
Code
pool.r.squared(BAT12Cog_MImodel_A_Cov, adjusted = TRUE)
              est    lo 95     hi 95      fmi
adj R^2 0.4085157 0.310057 0.5027409 0.310272
Code
summary(pool(BAT12Cog_MImodel_A_Cov), conf.int = TRUE, conf.level = 0.95)
                                 term    estimate  std.error  statistic
1                         (Intercept)  2.61254625 0.92626049  2.8205308
2                  T1_BAT12_Cognitive  0.56967672 0.05662955 10.0597086
3                             T1_PSS4  0.11863438 0.05852065  2.0272226
4                            Age_2024 -0.01228951 0.03062502 -0.4012899
5                   T1_Gender_MWWoman  0.38869573 0.29333238  1.3251034
6 T1_EducationMIUniversity (Bachelor)  0.15964365 0.41784125  0.3820677
7 T1_EducationMIUniversity (Postgrad) -0.08322826 0.47536829 -0.1750816
8            T1_EducationMIVocational -0.24959372 0.52355488 -0.4767289
         df      p.value        2.5 %     97.5 %     conf.low  conf.high
1 125.86377 5.572282e-03  0.779484741 4.44560777  0.779484741 4.44560777
2  96.29151 1.073408e-16  0.457272308 0.68208114  0.457272308 0.68208114
3  77.78493 4.606548e-02  0.002123646 0.23514510  0.002123646 0.23514510
4 189.07895 6.886599e-01 -0.072700115 0.04812109 -0.072700115 0.04812109
5 119.16936 1.876719e-01 -0.192123193 0.96951466 -0.192123193 0.96951466
6  91.55326 7.032966e-01 -0.670279103 0.98956640 -0.670279103 0.98956640
7 132.19355 8.612834e-01 -1.023540976 0.85708446 -1.023540976 0.85708446
8 188.95376 6.341061e-01 -1.282357137 0.78316970 -1.282357137 0.78316970
Code
hist(resid(BAT12Cog_MImodel_A_Cov$analyses[[1]])) #normal

Code
hist(scale(resid(BAT12Cog_MImodel_A_Cov$analyses[[1]]))) #if there are outliers, they are under 5 (dataset 1-5) 

Code
#"6613078c5f93a61aa901034c" "1231"   

# BAT12Emo_MImodel_A_Cov <- with(imp, lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI))
BAT12Emo_MImodel_A_Cov <- readRDS("BAT12Emo_MImodel_A_Cov_final.RDS")
summary(pool(BAT12Emo_MImodel_A_Cov))
                                 term    estimate  std.error  statistic
1                         (Intercept)  2.59372162 0.85424044  3.0362899
2                    T1_BAT12_Emotion  0.57650886 0.06108073  9.4384733
3                             T1_PSS4  0.13183093 0.05262236  2.5052262
4                            Age_2024 -0.05818289 0.02934242 -1.9828937
5                   T1_Gender_MWWoman  0.21031295 0.28281411  0.7436438
6 T1_EducationMIUniversity (Bachelor)  0.49540203 0.35555036  1.3933386
7 T1_EducationMIUniversity (Postgrad)  0.40235397 0.45412323  0.8860017
8            T1_EducationMIVocational  0.58667082 0.49690695  1.1806452
         df      p.value
1 111.61092 2.981547e-03
2 123.16369 3.048344e-16
3  87.32465 1.409287e-02
4 172.29880 4.896853e-02
5 107.00179 4.587218e-01
6 177.10910 1.652636e-01
7 126.84136 3.772933e-01
8 189.49068 2.392235e-01
Code
pool.r.squared(BAT12Emo_MImodel_A_Cov)
          est     lo 95     hi 95       fmi
R^2 0.3724395 0.2649034 0.4773194 0.4258426
Code
pool.r.squared(BAT12Emo_MImodel_A_Cov, adjusted = TRUE)
              est    lo 95     hi 95       fmi
adj R^2 0.3590415 0.250931 0.4654214 0.4349564
Code
summary(pool(BAT12Emo_MImodel_A_Cov), conf.int = TRUE, conf.level = 0.95)
                                 term    estimate  std.error  statistic
1                         (Intercept)  2.59372162 0.85424044  3.0362899
2                    T1_BAT12_Emotion  0.57650886 0.06108073  9.4384733
3                             T1_PSS4  0.13183093 0.05262236  2.5052262
4                            Age_2024 -0.05818289 0.02934242 -1.9828937
5                   T1_Gender_MWWoman  0.21031295 0.28281411  0.7436438
6 T1_EducationMIUniversity (Bachelor)  0.49540203 0.35555036  1.3933386
7 T1_EducationMIUniversity (Postgrad)  0.40235397 0.45412323  0.8860017
8            T1_EducationMIVocational  0.58667082 0.49690695  1.1806452
         df      p.value       2.5 %        97.5 %    conf.low     conf.high
1 111.61092 2.981547e-03  0.90108926  4.2863539807  0.90108926  4.2863539807
2 123.16369 3.048344e-16  0.45560489  0.6974128282  0.45560489  0.6974128282
3  87.32465 1.409287e-02  0.02724376  0.2364180916  0.02724376  0.2364180916
4 172.29880 4.896853e-02 -0.11609977 -0.0002660119 -0.11609977 -0.0002660119
5 107.00179 4.587218e-01 -0.35033293  0.7709588223 -0.35033293  0.7709588223
6 177.10910 1.652636e-01 -0.20625840  1.1970624673 -0.20625840  1.1970624673
7 126.84136 3.772933e-01 -0.49628477  1.3009927063 -0.49628477  1.3009927063
8 189.49068 2.392235e-01 -0.39350903  1.5668506838 -0.39350903  1.5668506838
Code
hist(resid(BAT12Emo_MImodel_A_Cov$analyses[[1]])) #normal

Code
hist(scale(resid(BAT12Emo_MImodel_A_Cov$analyses[[3]]))) #if there are outliers, they are under 5 (dataset 1-5)

Code
#"1187" "1231"

# BAT12Ment_MImodel_A_Cov <- with(imp, lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI))
BAT12Ment_MImodel_A_Cov <- readRDS("BAT12Ment_MImodel_A_Cov_final.RDS")
summary(pool(BAT12Ment_MImodel_A_Cov))
                                 term    estimate  std.error  statistic
1                         (Intercept)  2.42197409 0.88488877  2.7370379
2             T1_BAT12_MentalDistance  0.61512355 0.05898128 10.4291317
3                             T1_PSS4  0.14052125 0.05783568  2.4296636
4                            Age_2024 -0.01623838 0.03252420 -0.4992707
5                   T1_Gender_MWWoman  0.05382600 0.28727427  0.1873680
6 T1_EducationMIUniversity (Bachelor)  0.22544071 0.39033146  0.5775622
7 T1_EducationMIUniversity (Postgrad) -0.33433284 0.49334589 -0.6776844
8            T1_EducationMIVocational  0.06898938 0.54228190  0.1272205
         df      p.value
1 118.14576 7.157794e-03
2 104.88276 6.745988e-18
3  93.14513 1.703018e-02
4 119.45858 6.185070e-01
5 120.65849 8.516868e-01
6 126.69574 5.645847e-01
7  99.38379 4.995464e-01
8 136.01001 8.989538e-01
Code
pool.r.squared(BAT12Ment_MImodel_A_Cov)
          est     lo 95     hi 95       fmi
R^2 0.4529338 0.3586145 0.5412832 0.2676369
Code
pool.r.squared(BAT12Ment_MImodel_A_Cov, adjusted = TRUE)
              est    lo 95   hi 95       fmi
adj R^2 0.4412798 0.346163 0.53087 0.2728955
Code
summary(pool(BAT12Ment_MImodel_A_Cov), conf.int = TRUE, conf.level = 0.95)
                                 term    estimate  std.error  statistic
1                         (Intercept)  2.42197409 0.88488877  2.7370379
2             T1_BAT12_MentalDistance  0.61512355 0.05898128 10.4291317
3                             T1_PSS4  0.14052125 0.05783568  2.4296636
4                            Age_2024 -0.01623838 0.03252420 -0.4992707
5                   T1_Gender_MWWoman  0.05382600 0.28727427  0.1873680
6 T1_EducationMIUniversity (Bachelor)  0.22544071 0.39033146  0.5775622
7 T1_EducationMIUniversity (Postgrad) -0.33433284 0.49334589 -0.6776844
8            T1_EducationMIVocational  0.06898938 0.54228190  0.1272205
         df      p.value       2.5 %     97.5 %    conf.low  conf.high
1 118.14576 7.157794e-03  0.66967580 4.17427238  0.66967580 4.17427238
2 104.88276 6.745988e-18  0.49817304 0.73207406  0.49817304 0.73207406
3  93.14513 1.703018e-02  0.02567341 0.25536909  0.02567341 0.25536909
4 119.45858 6.185070e-01 -0.08063700 0.04816024 -0.08063700 0.04816024
5 120.65849 8.516868e-01 -0.51492546 0.62257745 -0.51492546 0.62257745
6 126.69574 5.645847e-01 -0.54697264 0.99785406 -0.54697264 0.99785406
7  99.38379 4.995464e-01 -1.31319136 0.64452568 -1.31319136 0.64452568
8 136.01001 8.989538e-01 -1.00340532 1.14138409 -1.00340532 1.14138409
Code
hist(resid(BAT12Ment_MImodel_A_Cov$analyses[[1]])) #normal

Code
hist(scale(resid(BAT12Ment_MImodel_A_Cov$analyses[[4]]))) #if there are outliers, they are under 5 (dataset 1-5) 

Code
#"1269" "1231" "1229"

# BAT12Exh_MImodel_A_Cov <- with(imp, lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI))
BAT12Exh_MImodel_A_Cov <- readRDS("BAT12Exh_MImodel_A_Cov_final.RDS")
summary(pool(BAT12Exh_MImodel_A_Cov))
                                 term    estimate  std.error  statistic
1                         (Intercept)  4.30631932 0.89218505  4.8267109
2                 T1_BAT12_Exhaustion  0.51260669 0.05893366  8.6980285
3                             T1_PSS4  0.11583663 0.05399162  2.1454557
4                            Age_2024 -0.04612490 0.03163098 -1.4582193
5                   T1_Gender_MWWoman  0.31345493 0.27302202  1.1480939
6 T1_EducationMIUniversity (Bachelor)  0.13600111 0.40571444  0.3352139
7 T1_EducationMIUniversity (Postgrad) -0.09302736 0.45779753 -0.2032063
8            T1_EducationMIVocational  0.22434218 0.50729884  0.4422288
         df      p.value
1 148.90235 3.405781e-06
2  85.51626 2.111767e-13
3 108.71326 3.414187e-02
4 127.10343 1.472467e-01
5 166.67860 2.525749e-01
6  93.64638 7.382135e-01
7 145.01386 8.392586e-01
8 198.58791 6.588049e-01
Code
pool.r.squared(BAT12Exh_MImodel_A_Cov)
          est     lo 95    hi 95       fmi
R^2 0.3831299 0.2903676 0.473337 0.2154644
Code
pool.r.squared(BAT12Exh_MImodel_A_Cov, adjusted = TRUE)
              est    lo 95     hi 95       fmi
adj R^2 0.3699887 0.276916 0.4611589 0.2215401
Code
summary(pool(BAT12Exh_MImodel_A_Cov), conf.int = TRUE, conf.level = 0.95)
                                 term    estimate  std.error  statistic
1                         (Intercept)  4.30631932 0.89218505  4.8267109
2                 T1_BAT12_Exhaustion  0.51260669 0.05893366  8.6980285
3                             T1_PSS4  0.11583663 0.05399162  2.1454557
4                            Age_2024 -0.04612490 0.03163098 -1.4582193
5                   T1_Gender_MWWoman  0.31345493 0.27302202  1.1480939
6 T1_EducationMIUniversity (Bachelor)  0.13600111 0.40571444  0.3352139
7 T1_EducationMIUniversity (Postgrad) -0.09302736 0.45779753 -0.2032063
8            T1_EducationMIVocational  0.22434218 0.50729884  0.4422288
         df      p.value        2.5 %     97.5 %     conf.low  conf.high
1 148.90235 3.405781e-06  2.543340432 6.06929820  2.543340432 6.06929820
2  85.51626 2.111767e-13  0.395440986 0.62977239  0.395440986 0.62977239
3 108.71326 3.414187e-02  0.008823827 0.22284944  0.008823827 0.22284944
4 127.10343 1.472467e-01 -0.108716412 0.01646661 -0.108716412 0.01646661
5 166.67860 2.525749e-01 -0.225572103 0.85248196 -0.225572103 0.85248196
6  93.64638 7.382135e-01 -0.669594078 0.94159630 -0.669594078 0.94159630
7 145.01386 8.392586e-01 -0.997844926 0.81179022 -0.997844926 0.81179022
8 198.58791 6.588049e-01 -0.776041795 1.22472616 -0.776041795 1.22472616
Code
hist(resid(BAT12Exh_MImodel_A_Cov$analyses[[1]])) #normal

Code
hist(scale(resid(BAT12Exh_MImodel_A_Cov$analyses[[3]]))) #if there are outliers, they are under 5 (dataset 1-5) 

Code
#[1] "65352230e1c63943779a4a24" "2001"

#MI Model B - Coping strategy use
# BAT12Cog_MImodel_B_ERall <- with(imp, lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW
#                              + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                              + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                              + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                              + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                              + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance))
BAT12Cog_MImodel_B_ERall <- readRDS("BAT12Cog_MImodel_B_ERall_final.RDS")
summary(pool(BAT12Cog_MImodel_B_ERall))
                                  term     estimate  std.error   statistic
1                          (Intercept)  1.306079642 1.07151493  1.21890942
2                   T1_BAT12_Cognitive  0.545428307 0.05914282  9.22222388
3                              T1_PSS4  0.111181596 0.06433897  1.72806002
4                             Age_2024 -0.007580278 0.03138218 -0.24154723
5                    T1_Gender_MWWoman  0.239126594 0.28877560  0.82807065
6  T1_EducationMIUniversity (Bachelor)  0.150229975 0.41686909  0.36037686
7  T1_EducationMIUniversity (Postgrad) -0.143059524 0.47862362 -0.29889775
8             T1_EducationMIVocational -0.316125357 0.52046952 -0.60738495
9              T1_COPE_SelfDistraction  0.039638497 0.12103696  0.32749084
10                T1_COPE_ActiveCoping  0.005043443 0.11815891  0.04268356
11                      T1_COPE_Denial -0.042638513 0.13660975 -0.31211911
12                T1_COPE_SubstanceUse  0.110125065 0.16837541  0.65404482
13       T1_COPE_UseOfEmotionalSupport  0.258931966 0.15908510  1.62763180
14     T1_COPE_BehavioralDisengagement  0.019986390 0.13330645  0.14992815
15                    T1_COPE_Religion -0.046306714 0.09032211 -0.51268413
16                     T1_COPE_Venting  0.172399761 0.12990345  1.32713766
17    T1_COPE_UseOfInstrumentalSupport -0.195742042 0.15757969 -1.24217813
18           T1_COPE_PositiveReframing  0.090235500 0.10369402  0.87020928
19                   T1_COPE_SelfBlame  0.114762901 0.09889207  1.16048638
20                    T1_COPE_Planning -0.160272540 0.14307402 -1.12020712
21                       T1_COPE_Humor -0.059659050 0.08610406 -0.69287154
22                  T1_COPE_Acceptance  0.069936023 0.10889668  0.64222364
          df      p.value
1  173.28675 2.245353e-01
2   83.55274 2.216589e-14
3   75.70496 8.805461e-02
4  166.31939 8.094286e-01
5  152.28231 4.089264e-01
6   94.80700 7.193670e-01
7  131.80057 7.654888e-01
8  184.74540 5.443413e-01
9   67.54450 7.443095e-01
10 115.32185 9.660276e-01
11 105.41362 7.555665e-01
12  44.17678 5.164734e-01
13  74.68506 1.078148e-01
14  90.53972 8.811548e-01
15 101.14619 6.092901e-01
16 126.07968 1.868615e-01
17  98.96804 2.171063e-01
18 145.49407 3.856195e-01
19 186.77481 2.473320e-01
20  68.41886 2.665424e-01
21 115.75818 4.897779e-01
22 128.89869 5.218686e-01
Code
pool.r.squared(BAT12Cog_MImodel_B_ERall)
          est     lo 95    hi 95       fmi
R^2 0.4653003 0.3709304 0.553135 0.2775548
Code
pool.r.squared(BAT12Cog_MImodel_B_ERall, adjusted = TRUE)
              est     lo 95     hi 95       fmi
adj R^2 0.4296056 0.3327126 0.5213404 0.2942565
Code
summary(pool(BAT12Cog_MImodel_B_ERall), conf.int = TRUE, conf.level = 0.95)
                                  term     estimate  std.error   statistic
1                          (Intercept)  1.306079642 1.07151493  1.21890942
2                   T1_BAT12_Cognitive  0.545428307 0.05914282  9.22222388
3                              T1_PSS4  0.111181596 0.06433897  1.72806002
4                             Age_2024 -0.007580278 0.03138218 -0.24154723
5                    T1_Gender_MWWoman  0.239126594 0.28877560  0.82807065
6  T1_EducationMIUniversity (Bachelor)  0.150229975 0.41686909  0.36037686
7  T1_EducationMIUniversity (Postgrad) -0.143059524 0.47862362 -0.29889775
8             T1_EducationMIVocational -0.316125357 0.52046952 -0.60738495
9              T1_COPE_SelfDistraction  0.039638497 0.12103696  0.32749084
10                T1_COPE_ActiveCoping  0.005043443 0.11815891  0.04268356
11                      T1_COPE_Denial -0.042638513 0.13660975 -0.31211911
12                T1_COPE_SubstanceUse  0.110125065 0.16837541  0.65404482
13       T1_COPE_UseOfEmotionalSupport  0.258931966 0.15908510  1.62763180
14     T1_COPE_BehavioralDisengagement  0.019986390 0.13330645  0.14992815
15                    T1_COPE_Religion -0.046306714 0.09032211 -0.51268413
16                     T1_COPE_Venting  0.172399761 0.12990345  1.32713766
17    T1_COPE_UseOfInstrumentalSupport -0.195742042 0.15757969 -1.24217813
18           T1_COPE_PositiveReframing  0.090235500 0.10369402  0.87020928
19                   T1_COPE_SelfBlame  0.114762901 0.09889207  1.16048638
20                    T1_COPE_Planning -0.160272540 0.14307402 -1.12020712
21                       T1_COPE_Humor -0.059659050 0.08610406 -0.69287154
22                  T1_COPE_Acceptance  0.069936023 0.10889668  0.64222364
          df      p.value       2.5 %     97.5 %    conf.low  conf.high
1  173.28675 2.245353e-01 -0.80882116 3.42098044 -0.80882116 3.42098044
2   83.55274 2.216589e-14  0.42780713 0.66304949  0.42780713 0.66304949
3   75.70496 8.805461e-02 -0.01696864 0.23933183 -0.01696864 0.23933183
4  166.31939 8.094286e-01 -0.06953905 0.05437849 -0.06953905 0.05437849
5  152.28231 4.089264e-01 -0.33139711 0.80965030 -0.33139711 0.80965030
6   94.80700 7.193670e-01 -0.67738154 0.97784149 -0.67738154 0.97784149
7  131.80057 7.654888e-01 -1.08983760 0.80371855 -1.08983760 0.80371855
8  184.74540 5.443413e-01 -1.34295335 0.71070264 -1.34295335 0.71070264
9   67.54450 7.443095e-01 -0.20191650 0.28119349 -0.20191650 0.28119349
10 115.32185 9.660276e-01 -0.22899967 0.23908656 -0.22899967 0.23908656
11 105.41362 7.555665e-01 -0.31349802 0.22822100 -0.31349802 0.22822100
12  44.17678 5.164734e-01 -0.22917493 0.44942506 -0.22917493 0.44942506
13  74.68506 1.078148e-01 -0.05800371 0.57586764 -0.05800371 0.57586764
14  90.53972 8.811548e-01 -0.24482863 0.28480141 -0.24482863 0.28480141
15 101.14619 6.092901e-01 -0.22547835 0.13286492 -0.22547835 0.13286492
16 126.07968 1.868615e-01 -0.08467377 0.42947330 -0.08467377 0.42947330
17  98.96804 2.171063e-01 -0.50841558 0.11693149 -0.50841558 0.11693149
18 145.49407 3.856195e-01 -0.11470568 0.29517668 -0.11470568 0.29517668
19 186.77481 2.473320e-01 -0.08032609 0.30985189 -0.08032609 0.30985189
20  68.41886 2.665424e-01 -0.44574067 0.12519559 -0.44574067 0.12519559
21 115.75818 4.897779e-01 -0.23020274 0.11088464 -0.23020274 0.11088464
22 128.89869 5.218686e-01 -0.14552033 0.28539238 -0.14552033 0.28539238
Code
# BAT12Emo_MImodel_B_ERall <- with(imp, lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW
#                              + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                              + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                              + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                              + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                              + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance))
BAT12Emo_MImodel_B_ERall <- readRDS("BAT12Emo_MImodel_B_ERall_final.RDS")
summary(pool(BAT12Emo_MImodel_B_ERall))
                                  term    estimate  std.error  statistic
1                          (Intercept)  1.97142016 1.15779904  1.7027309
2                     T1_BAT12_Emotion  0.56263339 0.06374588  8.8261915
3                              T1_PSS4  0.09395159 0.06023503  1.5597500
4                             Age_2024 -0.05624104 0.02966791 -1.8956859
5                    T1_Gender_MWWoman  0.21540420 0.28258567  0.7622616
6  T1_EducationMIUniversity (Bachelor)  0.53268458 0.35343336  1.5071712
7  T1_EducationMIUniversity (Postgrad)  0.43857073 0.45423429  0.9655166
8             T1_EducationMIVocational  0.56447376 0.49105421  1.1495141
9              T1_COPE_SelfDistraction -0.02988602 0.11825806 -0.2527186
10                T1_COPE_ActiveCoping  0.02984244 0.10830456  0.2755418
11                      T1_COPE_Denial -0.08339509 0.13406826 -0.6220346
12                T1_COPE_SubstanceUse  0.30287829 0.15238126  1.9876347
13       T1_COPE_UseOfEmotionalSupport  0.05172893 0.13700113  0.3775803
14     T1_COPE_BehavioralDisengagement  0.05850925 0.12659974  0.4621593
15                    T1_COPE_Religion -0.02968824 0.08947372 -0.3318097
16                     T1_COPE_Venting  0.07250725 0.12485295  0.5807412
17    T1_COPE_UseOfInstrumentalSupport  0.02563886 0.14075249  0.1821556
18           T1_COPE_PositiveReframing  0.06789335 0.10426284  0.6511749
19                   T1_COPE_SelfBlame  0.10558483 0.09725154  1.0856880
20                    T1_COPE_Planning -0.14841837 0.12701133 -1.1685444
21                       T1_COPE_Humor  0.03172276 0.08001818  0.3964444
22                  T1_COPE_Acceptance -0.09422004 0.10282550 -0.9163100
          df      p.value
1   73.34407 9.285318e-02
2  132.36215 5.598518e-15
3   77.34423 1.229017e-01
4  166.45308 5.973461e-02
5  119.55175 4.474052e-01
6  186.42934 1.334594e-01
7  129.13113 3.360909e-01
8  190.40350 2.517859e-01
9   57.77473 8.013826e-01
10 137.91502 7.833124e-01
11  90.54841 5.354823e-01
12  50.18603 5.232209e-02
13 138.11489 7.063220e-01
14  89.42267 6.450896e-01
15  80.85617 7.408915e-01
16 116.98197 5.625320e-01
17 157.09205 8.556954e-01
18 101.60479 5.164036e-01
19 142.95464 2.794445e-01
20  91.83535 2.456117e-01
21 129.19517 6.924312e-01
22 131.06909 3.611872e-01
Code
pool.r.squared(BAT12Emo_MImodel_B_ERall)
          est     lo 95     hi 95       fmi
R^2 0.4220947 0.3051707 0.5321694 0.5208434
Code
pool.r.squared(BAT12Emo_MImodel_B_ERall, adjusted = TRUE)
              est     lo 95     hi 95       fmi
adj R^2 0.3833969 0.2633274 0.4992973 0.5448591
Code
summary(pool(BAT12Emo_MImodel_B_ERall), conf.int = TRUE, conf.level = 0.95)
                                  term    estimate  std.error  statistic
1                          (Intercept)  1.97142016 1.15779904  1.7027309
2                     T1_BAT12_Emotion  0.56263339 0.06374588  8.8261915
3                              T1_PSS4  0.09395159 0.06023503  1.5597500
4                             Age_2024 -0.05624104 0.02966791 -1.8956859
5                    T1_Gender_MWWoman  0.21540420 0.28258567  0.7622616
6  T1_EducationMIUniversity (Bachelor)  0.53268458 0.35343336  1.5071712
7  T1_EducationMIUniversity (Postgrad)  0.43857073 0.45423429  0.9655166
8             T1_EducationMIVocational  0.56447376 0.49105421  1.1495141
9              T1_COPE_SelfDistraction -0.02988602 0.11825806 -0.2527186
10                T1_COPE_ActiveCoping  0.02984244 0.10830456  0.2755418
11                      T1_COPE_Denial -0.08339509 0.13406826 -0.6220346
12                T1_COPE_SubstanceUse  0.30287829 0.15238126  1.9876347
13       T1_COPE_UseOfEmotionalSupport  0.05172893 0.13700113  0.3775803
14     T1_COPE_BehavioralDisengagement  0.05850925 0.12659974  0.4621593
15                    T1_COPE_Religion -0.02968824 0.08947372 -0.3318097
16                     T1_COPE_Venting  0.07250725 0.12485295  0.5807412
17    T1_COPE_UseOfInstrumentalSupport  0.02563886 0.14075249  0.1821556
18           T1_COPE_PositiveReframing  0.06789335 0.10426284  0.6511749
19                   T1_COPE_SelfBlame  0.10558483 0.09725154  1.0856880
20                    T1_COPE_Planning -0.14841837 0.12701133 -1.1685444
21                       T1_COPE_Humor  0.03172276 0.08001818  0.3964444
22                  T1_COPE_Acceptance -0.09422004 0.10282550 -0.9163100
          df      p.value        2.5 %      97.5 %     conf.low   conf.high
1   73.34407 9.285318e-02 -0.335887647 4.278727973 -0.335887647 4.278727973
2  132.36215 5.598518e-15  0.436540916 0.688725856  0.436540916 0.688725856
3   77.34423 1.229017e-01 -0.025983165 0.213886342 -0.025983165 0.213886342
4  166.45308 5.973461e-02 -0.114814941 0.002332858 -0.114814941 0.002332858
5  119.55175 4.474052e-01 -0.344117131 0.774925522 -0.344117131 0.774925522
6  186.42934 1.334594e-01 -0.164558281 1.229927443 -0.164558281 1.229927443
7  129.13113 3.360909e-01 -0.460134290 1.337275750 -0.460134290 1.337275750
8  190.40350 2.517859e-01 -0.404131349 1.533078861 -0.404131349 1.533078861
9   57.77473 8.013826e-01 -0.266624889 0.206852857 -0.266624889 0.206852857
10 137.91502 7.833124e-01 -0.184309725 0.243994596 -0.184309725 0.243994596
11  90.54841 5.354823e-01 -0.349723118 0.182932930 -0.349723118 0.182932930
12  50.18603 5.232209e-02 -0.003160374 0.608916963 -0.003160374 0.608916963
13 138.11489 7.063220e-01 -0.219161894 0.322619761 -0.219161894 0.322619761
14  89.42267 6.450896e-01 -0.193025356 0.310043851 -0.193025356 0.310043851
15  80.85617 7.408915e-01 -0.207717683 0.148341194 -0.207717683 0.148341194
16 116.98197 5.625320e-01 -0.174757861 0.319772370 -0.174757861 0.319772370
17 157.09205 8.556954e-01 -0.252372665 0.303650382 -0.252372665 0.303650382
18 101.60479 5.164036e-01 -0.138921158 0.274707855 -0.138921158 0.274707855
19 142.95464 2.794445e-01 -0.086652051 0.297821712 -0.086652051 0.297821712
20  91.83535 2.456117e-01 -0.400679863 0.103843119 -0.400679863 0.103843119
21 129.19517 6.924312e-01 -0.126592904 0.190038427 -0.126592904 0.190038427
22 131.06909 3.611872e-01 -0.297632415 0.109192333 -0.297632415 0.109192333
Code
# BAT12Ment_MImodel_B_ERall <- with(imp, lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW
#                               + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                               + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                               + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                               + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                               + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance))
BAT12Ment_MImodel_B_ERall <- readRDS("BAT12Ment_MImodel_B_ERall_final.RDS")
summary(pool(BAT12Ment_MImodel_B_ERall))
                                  term      estimate  std.error    statistic
1                          (Intercept)  1.9342642417 1.12527197  1.718930443
2              T1_BAT12_MentalDistance  0.5885725765 0.06034929  9.752767308
3                              T1_PSS4  0.1058931850 0.06608765  1.602314305
4                             Age_2024 -0.0201004387 0.03213786 -0.625444134
5                    T1_Gender_MWWoman -0.1103334608 0.28090675 -0.392776116
6  T1_EducationMIUniversity (Bachelor)  0.2822556712 0.39254874  0.719033436
7  T1_EducationMIUniversity (Postgrad) -0.2377770861 0.48677310 -0.488476228
8             T1_EducationMIVocational  0.0628881961 0.53063330  0.118515359
9              T1_COPE_SelfDistraction -0.0385443242 0.11736083 -0.328425794
10                T1_COPE_ActiveCoping  0.1024179162 0.12098719  0.846518651
11                      T1_COPE_Denial -0.0970494305 0.12347528 -0.785982644
12                T1_COPE_SubstanceUse  0.2648598148 0.15835268  1.672594428
13       T1_COPE_UseOfEmotionalSupport  0.2209660126 0.15861650  1.393083394
14     T1_COPE_BehavioralDisengagement  0.2546877485 0.12236490  2.081379136
15                    T1_COPE_Religion -0.1141876062 0.09086572 -1.256663256
16                     T1_COPE_Venting -0.0225320808 0.11836802 -0.190356159
17    T1_COPE_UseOfInstrumentalSupport -0.1025224346 0.15243806 -0.672551438
18           T1_COPE_PositiveReframing -0.0133233904 0.10710268 -0.124398295
19                   T1_COPE_SelfBlame  0.1575295406 0.09866452  1.596617878
20                    T1_COPE_Planning -0.1137669829 0.13481664 -0.843864542
21                       T1_COPE_Humor -0.1253851659 0.08944950 -1.401742481
22                  T1_COPE_Acceptance  0.0005555305 0.11058713  0.005023464
          df      p.value
1   95.00045 8.888405e-02
2  101.21416 3.084740e-16
3   71.77034 1.134786e-01
4  121.22776 5.328552e-01
5  142.77493 6.950706e-01
6  113.93323 4.735925e-01
7  102.82412 6.262527e-01
8  132.65026 9.058386e-01
9   66.12618 7.436275e-01
10  84.35704 3.996585e-01
11 163.27895 4.330168e-01
12  48.18956 1.008883e-01
13  67.99545 1.681324e-01
14 125.64128 3.942969e-02
15  83.70666 2.123711e-01
16 203.75511 8.492196e-01
17 102.55810 5.027452e-01
18  98.98344 9.012522e-01
19 155.19069 1.123852e-01
20  77.57952 4.013397e-01
21  77.25089 1.649974e-01
22  99.32639 9.960019e-01
Code
pool.r.squared(BAT12Ment_MImodel_B_ERall)
          est     lo 95     hi 95       fmi
R^2 0.5123433 0.4160023 0.5996923 0.3506733
Code
pool.r.squared(BAT12Ment_MImodel_B_ERall, adjusted = TRUE)
              est     lo 95     hi 95       fmi
adj R^2 0.4797809 0.3799409 0.5716201 0.3668704
Code
summary(pool(BAT12Ment_MImodel_B_ERall), conf.int = TRUE, conf.level = 0.95)
                                  term      estimate  std.error    statistic
1                          (Intercept)  1.9342642417 1.12527197  1.718930443
2              T1_BAT12_MentalDistance  0.5885725765 0.06034929  9.752767308
3                              T1_PSS4  0.1058931850 0.06608765  1.602314305
4                             Age_2024 -0.0201004387 0.03213786 -0.625444134
5                    T1_Gender_MWWoman -0.1103334608 0.28090675 -0.392776116
6  T1_EducationMIUniversity (Bachelor)  0.2822556712 0.39254874  0.719033436
7  T1_EducationMIUniversity (Postgrad) -0.2377770861 0.48677310 -0.488476228
8             T1_EducationMIVocational  0.0628881961 0.53063330  0.118515359
9              T1_COPE_SelfDistraction -0.0385443242 0.11736083 -0.328425794
10                T1_COPE_ActiveCoping  0.1024179162 0.12098719  0.846518651
11                      T1_COPE_Denial -0.0970494305 0.12347528 -0.785982644
12                T1_COPE_SubstanceUse  0.2648598148 0.15835268  1.672594428
13       T1_COPE_UseOfEmotionalSupport  0.2209660126 0.15861650  1.393083394
14     T1_COPE_BehavioralDisengagement  0.2546877485 0.12236490  2.081379136
15                    T1_COPE_Religion -0.1141876062 0.09086572 -1.256663256
16                     T1_COPE_Venting -0.0225320808 0.11836802 -0.190356159
17    T1_COPE_UseOfInstrumentalSupport -0.1025224346 0.15243806 -0.672551438
18           T1_COPE_PositiveReframing -0.0133233904 0.10710268 -0.124398295
19                   T1_COPE_SelfBlame  0.1575295406 0.09866452  1.596617878
20                    T1_COPE_Planning -0.1137669829 0.13481664 -0.843864542
21                       T1_COPE_Humor -0.1253851659 0.08944950 -1.401742481
22                  T1_COPE_Acceptance  0.0005555305 0.11058713  0.005023464
          df      p.value       2.5 %     97.5 %    conf.low  conf.high
1   95.00045 8.888405e-02 -0.29968292 4.16821141 -0.29968292 4.16821141
2  101.21416 3.084740e-16  0.46885889 0.70828626  0.46885889 0.70828626
3   71.77034 1.134786e-01 -0.02585734 0.23764371 -0.02585734 0.23764371
4  121.22776 5.328552e-01 -0.08372461 0.04352373 -0.08372461 0.04352373
5  142.77493 6.950706e-01 -0.66560710 0.44494018 -0.66560710 0.44494018
6  113.93323 4.735925e-01 -0.49538525 1.05989659 -0.49538525 1.05989659
7  102.82412 6.262527e-01 -1.20319634 0.72764217 -1.20319634 0.72764217
8  132.65026 9.058386e-01 -0.98670932 1.11248572 -0.98670932 1.11248572
9   66.12618 7.436275e-01 -0.27285444 0.19576579 -0.27285444 0.19576579
10  84.35704 3.996585e-01 -0.13816351 0.34299934 -0.13816351 0.34299934
11 163.27895 4.330168e-01 -0.34086365 0.14676479 -0.34086365 0.14676479
12  48.18956 1.008883e-01 -0.05349724 0.58321687 -0.05349724 0.58321687
13  67.99545 1.681324e-01 -0.09554867 0.53748069 -0.09554867 0.53748069
14 125.64128 3.942969e-02  0.01252451 0.49685099  0.01252451 0.49685099
15  83.70666 2.123711e-01 -0.29489330 0.06651809 -0.29489330 0.06651809
16 203.75511 8.492196e-01 -0.25591534 0.21085118 -0.25591534 0.21085118
17 102.55810 5.027452e-01 -0.40486285 0.19981798 -0.40486285 0.19981798
18  98.98344 9.012522e-01 -0.22583878 0.19919200 -0.22583878 0.19919200
19 155.19069 1.123852e-01 -0.03736920 0.35242828 -0.03736920 0.35242828
20  77.57952 4.013397e-01 -0.38218921 0.15465525 -0.38218921 0.15465525
21  77.25089 1.649974e-01 -0.30349265 0.05272232 -0.30349265 0.05272232
22  99.32639 9.960019e-01 -0.21886441 0.21997547 -0.21886441 0.21997547
Code
hist(resid(BAT12Ment_MImodel_B_ERall$analyses[[1]])) #normal

Code
hist(scale(resid(BAT12Ment_MImodel_B_ERall$analyses[[5]]))) #if there are outliers, they are under 5 (dataset 1-5) 

Code
#[1] "6453e4f6d6bad848815f72bf" "64b72c970a6c7e3539ad6d32"
# Extract residuals from the 3rd imputed model

# BAT12Exh_MImodel_B_ERall <- with(imp, lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW
#                              + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping
#                              + T1_COPE_Denial + T1_COPE_SubstanceUse + T1_COPE_UseOfEmotionalSupport
#                              + T1_COPE_BehavioralDisengagement + T1_COPE_Religion + T1_COPE_Venting
#                              + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing
#                              + T1_COPE_SelfBlame + T1_COPE_Planning +T1_COPE_Humor + T1_COPE_Acceptance))
BAT12Exh_MImodel_B_ERall <- readRDS("BAT12Exh_MImodel_B_ERall_final.RDS")
summary(pool(BAT12Exh_MImodel_B_ERall))
                                  term      estimate  std.error    statistic
1                          (Intercept)  3.4176415249 1.08125725  3.160803334
2                  T1_BAT12_Exhaustion  0.4772298687 0.05834996  8.178752386
3                              T1_PSS4  0.0534767610 0.05865008  0.911793481
4                             Age_2024 -0.0475733004 0.03129178 -1.520312893
5                    T1_Gender_MWWoman  0.1592350421 0.26511425  0.600628005
6  T1_EducationMIUniversity (Bachelor)  0.2224247429 0.40751553  0.545806786
7  T1_EducationMIUniversity (Postgrad) -0.0691931537 0.45680693 -0.151471331
8             T1_EducationMIVocational  0.2827331359 0.49740748  0.568413513
9              T1_COPE_SelfDistraction  0.1689478568 0.10694239  1.579802531
10                T1_COPE_ActiveCoping  0.0219997798 0.11179911  0.196779553
11                      T1_COPE_Denial -0.1289206597 0.12730988 -1.012652420
12                T1_COPE_SubstanceUse -0.0205702753 0.14547352 -0.141402198
13       T1_COPE_UseOfEmotionalSupport  0.1022453013 0.14910822  0.685712055
14     T1_COPE_BehavioralDisengagement  0.3850713866 0.11811223  3.260216054
15                    T1_COPE_Religion -0.0710802779 0.08962418 -0.793092625
16                     T1_COPE_Venting  0.0001747155 0.13646818  0.001280266
17    T1_COPE_UseOfInstrumentalSupport -0.1214563353 0.14528127 -0.836008226
18           T1_COPE_PositiveReframing -0.0778288156 0.10631202 -0.732079182
19                   T1_COPE_SelfBlame  0.0968919156 0.09924180  0.976321649
20                    T1_COPE_Planning  0.0438002540 0.13013890  0.336565422
21                       T1_COPE_Humor  0.0177845220 0.07936437  0.224086992
22                  T1_COPE_Acceptance -0.0088331073 0.11499232 -0.076814761
          df      p.value
1  124.87890 1.974608e-03
2   91.06814 1.624147e-12
3  117.66680 3.637417e-01
4  127.32348 1.309118e-01
5  206.21924 5.487473e-01
6   85.58108 5.866187e-01
7  138.16956 8.798249e-01
8  189.24529 5.704281e-01
9   98.78192 1.173490e-01
10 124.78368 8.443202e-01
11 125.21106 3.131791e-01
12  62.49499 8.880070e-01
13  84.62476 4.947690e-01
14 145.11288 1.387236e-03
15  87.64334 4.298657e-01
16  77.13435 9.989818e-01
17 125.19117 4.047431e-01
18  97.18941 4.658819e-01
19 138.23208 3.306106e-01
20  86.94477 7.372555e-01
21 141.76886 8.230122e-01
22  78.10354 9.389673e-01
Code
pool.r.squared(BAT12Exh_MImodel_B_ERall)
          est     lo 95     hi 95       fmi
R^2 0.4499694 0.3555466 0.5385448 0.2672865
Code
pool.r.squared(BAT12Exh_MImodel_B_ERall, adjusted = TRUE)
              est     lo 95     hi 95       fmi
adj R^2 0.4132508 0.3165948 0.5055818 0.2845691
Code
summary(pool(BAT12Exh_MImodel_B_ERall), conf.int = TRUE, conf.level = 0.95)
                                  term      estimate  std.error    statistic
1                          (Intercept)  3.4176415249 1.08125725  3.160803334
2                  T1_BAT12_Exhaustion  0.4772298687 0.05834996  8.178752386
3                              T1_PSS4  0.0534767610 0.05865008  0.911793481
4                             Age_2024 -0.0475733004 0.03129178 -1.520312893
5                    T1_Gender_MWWoman  0.1592350421 0.26511425  0.600628005
6  T1_EducationMIUniversity (Bachelor)  0.2224247429 0.40751553  0.545806786
7  T1_EducationMIUniversity (Postgrad) -0.0691931537 0.45680693 -0.151471331
8             T1_EducationMIVocational  0.2827331359 0.49740748  0.568413513
9              T1_COPE_SelfDistraction  0.1689478568 0.10694239  1.579802531
10                T1_COPE_ActiveCoping  0.0219997798 0.11179911  0.196779553
11                      T1_COPE_Denial -0.1289206597 0.12730988 -1.012652420
12                T1_COPE_SubstanceUse -0.0205702753 0.14547352 -0.141402198
13       T1_COPE_UseOfEmotionalSupport  0.1022453013 0.14910822  0.685712055
14     T1_COPE_BehavioralDisengagement  0.3850713866 0.11811223  3.260216054
15                    T1_COPE_Religion -0.0710802779 0.08962418 -0.793092625
16                     T1_COPE_Venting  0.0001747155 0.13646818  0.001280266
17    T1_COPE_UseOfInstrumentalSupport -0.1214563353 0.14528127 -0.836008226
18           T1_COPE_PositiveReframing -0.0778288156 0.10631202 -0.732079182
19                   T1_COPE_SelfBlame  0.0968919156 0.09924180  0.976321649
20                    T1_COPE_Planning  0.0438002540 0.13013890  0.336565422
21                       T1_COPE_Humor  0.0177845220 0.07936437  0.224086992
22                  T1_COPE_Acceptance -0.0088331073 0.11499232 -0.076814761
          df      p.value       2.5 %     97.5 %    conf.low  conf.high
1  124.87890 1.974608e-03  1.27767895 5.55760410  1.27767895 5.55760410
2   91.06814 1.624147e-12  0.36132601 0.59313373  0.36132601 0.59313373
3  117.66680 3.637417e-01 -0.06266977 0.16962329 -0.06266977 0.16962329
4  127.32348 1.309118e-01 -0.10949258 0.01434598 -0.10949258 0.01434598
5  206.21924 5.487473e-01 -0.36344679 0.68191687 -0.36344679 0.68191687
6   85.58108 5.866187e-01 -0.58774590 1.03259539 -0.58774590 1.03259539
7  138.16956 8.798249e-01 -0.97242931 0.83404300 -0.97242931 0.83404300
8  189.24529 5.704281e-01 -0.69844223 1.26390850 -0.69844223 1.26390850
9   98.78192 1.173490e-01 -0.04325484 0.38115055 -0.04325484 0.38115055
10 124.78368 8.443202e-01 -0.19926829 0.24326785 -0.19926829 0.24326785
11 125.21106 3.131791e-01 -0.38087856 0.12303725 -0.38087856 0.12303725
12  62.49499 8.880070e-01 -0.31132189 0.27018134 -0.31132189 0.27018134
13  84.62476 4.947690e-01 -0.19424076 0.39873136 -0.19424076 0.39873136
14 145.11288 1.387236e-03  0.15162887 0.61851390  0.15162887 0.61851390
15  87.64334 4.298657e-01 -0.24919961 0.10703905 -0.24919961 0.10703905
16  77.13435 9.989818e-01 -0.27156060 0.27191003 -0.27156060 0.27191003
17 125.19117 4.047431e-01 -0.40898170 0.16606903 -0.40898170 0.16606903
18  97.18941 4.658819e-01 -0.28882355 0.13316592 -0.28882355 0.13316592
19 138.23208 3.306106e-01 -0.09933633 0.29312016 -0.09933633 0.29312016
20  86.94477 7.372555e-01 -0.21486722 0.30246773 -0.21486722 0.30246773
21 141.76886 8.230122e-01 -0.13910603 0.17467507 -0.13910603 0.17467507
22  78.10354 9.389673e-01 -0.23776044 0.22009423 -0.23776044 0.22009423
Code
hist(resid(BAT12Exh_MImodel_B_ERall$analyses[[1]])) #normal

Code
hist(scale(resid(BAT12Exh_MImodel_B_ERall$analyses[[5]]))) #if there are outliers, they are under 5 (dataset 1-5) 

Code
#MI Model C - Cog Flex CST
# BAT12Cog_MImodel_C_CST <- with(imp, lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1))
BAT12Cog_MImodel_C_CST <- readRDS("BAT12Cog_MImodel_C_CST_final.RDS")
summary(pool(BAT12Cog_MImodel_C_CST))
                                 term      estimate    std.error  statistic
1                         (Intercept)  2.8372144292 0.9467479572  2.9968002
2                  T1_BAT12_Cognitive  0.5729687354 0.0568876436 10.0719365
3                             T1_PSS4  0.1159221333 0.0582332121  1.9906533
4                            Age_2024 -0.0140274206 0.0307302605 -0.4564693
5                   T1_Gender_MWWoman  0.3746265603 0.2921470657  1.2823218
6 T1_EducationMIUniversity (Bachelor)  0.1688341056 0.4165958526  0.4052707
7 T1_EducationMIUniversity (Postgrad) -0.0742374656 0.4728161321 -0.1570113
8            T1_EducationMIVocational -0.2448419277 0.5209368494 -0.4700031
9                    CST_switchcost.1 -0.0008627011 0.0009429068 -0.9149379
         df      p.value
1 123.58430 3.298212e-03
2  93.25043 1.403527e-16
3  78.83618 4.998442e-02
4 182.24064 6.485961e-01
5 120.47806 2.021916e-01
6  91.65501 6.862229e-01
7 134.38597 8.754716e-01
8 191.72636 6.388870e-01
9  45.25796 3.650734e-01
Code
pool.r.squared(BAT12Cog_MImodel_C_CST)
          est     lo 95     hi 95       fmi
R^2 0.4257941 0.3268904 0.5195276 0.3220622
Code
pool.r.squared(BAT12Cog_MImodel_C_CST, adjusted = TRUE)
              est     lo 95    hi 95      fmi
adj R^2 0.4117643 0.3120129 0.507001 0.329534
Code
summary(pool(BAT12Cog_MImodel_C_CST), conf.int = TRUE, conf.level = 0.95)
                                 term      estimate    std.error  statistic
1                         (Intercept)  2.8372144292 0.9467479572  2.9968002
2                  T1_BAT12_Cognitive  0.5729687354 0.0568876436 10.0719365
3                             T1_PSS4  0.1159221333 0.0582332121  1.9906533
4                            Age_2024 -0.0140274206 0.0307302605 -0.4564693
5                   T1_Gender_MWWoman  0.3746265603 0.2921470657  1.2823218
6 T1_EducationMIUniversity (Bachelor)  0.1688341056 0.4165958526  0.4052707
7 T1_EducationMIUniversity (Postgrad) -0.0742374656 0.4728161321 -0.1570113
8            T1_EducationMIVocational -0.2448419277 0.5209368494 -0.4700031
9                    CST_switchcost.1 -0.0008627011 0.0009429068 -0.9149379
         df      p.value         2.5 %      97.5 %      conf.low   conf.high
1 123.58430 3.298212e-03  9.632729e-01 4.711155945  9.632729e-01 4.711155945
2  93.25043 1.403527e-16  4.600051e-01 0.685932323  4.600051e-01 0.685932323
3  78.83618 4.998442e-02  8.078616e-06 0.231836188  8.078616e-06 0.231836188
4 182.24064 6.485961e-01 -7.466027e-02 0.046605431 -7.466027e-02 0.046605431
5 120.47806 2.021916e-01 -2.037809e-01 0.953034043 -2.037809e-01 0.953034043
6  91.65501 6.862229e-01 -6.586027e-01 0.996270925 -6.586027e-01 0.996270925
7 134.38597 8.754716e-01 -1.009361e+00 0.860885988 -1.009361e+00 0.860885988
8 191.72636 6.388870e-01 -1.272345e+00 0.782661387 -1.272345e+00 0.782661387
9  45.25796 3.650734e-01 -2.761514e-03 0.001036112 -2.761514e-03 0.001036112
Code
# BAT12Emo_MImodel_C_CST <- with(imp, lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1))
BAT12Emo_MImodel_C_CST <- readRDS("BAT12Emo_MImodel_C_CST_final.RDS")
summary(pool(BAT12Emo_MImodel_C_CST))
                                 term      estimate    std.error   statistic
1                         (Intercept)  2.604074e+00 0.8851199372  2.94205741
2                    T1_BAT12_Emotion  5.766755e-01 0.0613195834  9.40442549
3                             T1_PSS4  1.317101e-01 0.0525619012  2.50580874
4                            Age_2024 -5.821950e-02 0.0295546163 -1.96989529
5                   T1_Gender_MWWoman  2.098716e-01 0.2839512910  0.73911124
6 T1_EducationMIUniversity (Bachelor)  4.956006e-01 0.3571019283  1.38784077
7 T1_EducationMIUniversity (Postgrad)  4.014384e-01 0.4556857556  0.88095449
8            T1_EducationMIVocational  5.879985e-01 0.4984548757  1.17964237
9                    CST_switchcost.1 -4.275456e-05 0.0008053743 -0.05308657
         df      p.value
1 106.36752 4.002319e-03
2 120.97558 4.234847e-16
3  88.21942 1.405197e-02
4 165.92443 5.051484e-02
5 105.15121 4.614862e-01
6 172.37955 1.669768e-01
7 124.47754 3.800403e-01
8 185.74399 2.396512e-01
9  65.30178 9.578250e-01
Code
pool.r.squared(BAT12Emo_MImodel_C_CST)
          est     lo 95    hi 95      fmi
R^2 0.3737605 0.2667458 0.478053 0.419707
Code
pool.r.squared(BAT12Emo_MImodel_C_CST, adjusted = TRUE)
              est     lo 95     hi 95       fmi
adj R^2 0.3584352 0.2507703 0.4644258 0.4301004
Code
summary(pool(BAT12Emo_MImodel_C_CST), conf.int = TRUE, conf.level = 0.95)
                                 term      estimate    std.error   statistic
1                         (Intercept)  2.604074e+00 0.8851199372  2.94205741
2                    T1_BAT12_Emotion  5.766755e-01 0.0613195834  9.40442549
3                             T1_PSS4  1.317101e-01 0.0525619012  2.50580874
4                            Age_2024 -5.821950e-02 0.0295546163 -1.96989529
5                   T1_Gender_MWWoman  2.098716e-01 0.2839512910  0.73911124
6 T1_EducationMIUniversity (Bachelor)  4.956006e-01 0.3571019283  1.38784077
7 T1_EducationMIUniversity (Postgrad)  4.014384e-01 0.4556857556  0.88095449
8            T1_EducationMIVocational  5.879985e-01 0.4984548757  1.17964237
9                    CST_switchcost.1 -4.275456e-05 0.0008053743 -0.05308657
         df      p.value        2.5 %       97.5 %     conf.low    conf.high
1 106.36752 4.002319e-03  0.849307301 4.3588400356  0.849307301 4.3588400356
2 120.97558 4.234847e-16  0.455276917 0.6980739900  0.455276917 0.6980739900
3  88.21942 1.405197e-02  0.027257959 0.2361621839  0.027257959 0.2361621839
4 165.92443 5.051484e-02 -0.116571081 0.0001320819 -0.116571081 0.0001320819
5 105.15121 4.614862e-01 -0.353141930 0.7728851104 -0.353141930 0.7728851104
6 172.37955 1.669768e-01 -0.209254804 1.2004560364 -0.209254804 1.2004560364
7 124.47754 3.800403e-01 -0.500457253 1.3033340736 -0.500457253 1.3033340736
8 185.74399 2.396512e-01 -0.395362221 1.5713592011 -0.395362221 1.5713592011
9  65.30178 9.578250e-01 -0.001651057 0.0015655482 -0.001651057 0.0015655482
Code
# BAT12Ment_MImodel_C_CST <- with(imp, lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1))
BAT12Ment_MImodel_C_CST <- readRDS("BAT12Ment_MImodel_C_CST_final.RDS")
summary(pool(BAT12Ment_MImodel_C_CST))
                                 term      estimate   std.error  statistic
1                         (Intercept)  2.6145941867 0.867929963  3.0124484
2             T1_BAT12_MentalDistance  0.6181824719 0.058834499 10.5071427
3                             T1_PSS4  0.1380440955 0.057495423  2.4009580
4                            Age_2024 -0.0179961991 0.032305115 -0.5570696
5                   T1_Gender_MWWoman  0.0435429390 0.286829926  0.1518075
6 T1_EducationMIUniversity (Bachelor)  0.2366812318 0.390582894  0.6059693
7 T1_EducationMIUniversity (Postgrad) -0.3235104482 0.493224006 -0.6559098
8            T1_EducationMIVocational  0.0749133475 0.541038865  0.1384620
9                    CST_switchcost.1 -0.0007184625 0.000772088 -0.9305449
         df      p.value
1 156.82540 3.022159e-03
2 106.55249 3.786967e-18
3  96.01845 1.827858e-02
4 124.95402 5.784763e-01
5 121.27295 8.795910e-01
6 125.46913 5.456298e-01
7  98.95986 5.134043e-01
8 136.97961 8.900786e-01
9  96.44620 3.544124e-01
Code
pool.r.squared(BAT12Ment_MImodel_C_CST)
          est     lo 95    hi 95       fmi
R^2 0.4558351 0.3607518 0.544722 0.2816169
Code
pool.r.squared(BAT12Ment_MImodel_C_CST, adjusted = TRUE)
              est     lo 95     hi 95       fmi
adj R^2 0.4425455 0.3465136 0.5328883 0.2877724
Code
summary(pool(BAT12Ment_MImodel_C_CST), conf.int = TRUE, conf.level = 0.95)
                                 term      estimate   std.error  statistic
1                         (Intercept)  2.6145941867 0.867929963  3.0124484
2             T1_BAT12_MentalDistance  0.6181824719 0.058834499 10.5071427
3                             T1_PSS4  0.1380440955 0.057495423  2.4009580
4                            Age_2024 -0.0179961991 0.032305115 -0.5570696
5                   T1_Gender_MWWoman  0.0435429390 0.286829926  0.1518075
6 T1_EducationMIUniversity (Bachelor)  0.2366812318 0.390582894  0.6059693
7 T1_EducationMIUniversity (Postgrad) -0.3235104482 0.493224006 -0.6559098
8            T1_EducationMIVocational  0.0749133475 0.541038865  0.1384620
9                    CST_switchcost.1 -0.0007184625 0.000772088 -0.9305449
         df      p.value        2.5 %       97.5 %     conf.low    conf.high
1 156.82540 3.022159e-03  0.900253505 4.3289348681  0.900253505 4.3289348681
2 106.55249 3.786967e-18  0.501544338 0.7348206057  0.501544338 0.7348206057
3  96.01845 1.827858e-02  0.023916863 0.2521713281  0.023916863 0.2521713281
4 124.95402 5.784763e-01 -0.081932261 0.0459398633 -0.081932261 0.0459398633
5 121.27295 8.795910e-01 -0.524299646 0.6113855237 -0.524299646 0.6113855237
6 125.46913 5.456298e-01 -0.536302541 1.0096650051 -0.536302541 1.0096650051
7  98.95986 5.134043e-01 -1.302178793 0.6551578965 -1.302178793 0.6551578965
8 136.97961 8.900786e-01 -0.994955209 1.1447819040 -0.994955209 1.1447819040
9  96.44620 3.544124e-01 -0.002250955 0.0008140295 -0.002250955 0.0008140295
Code
# BAT12Exh_MImodel_C_CST <- with(imp, lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + CST_switchcost.1))
BAT12Exh_MImodel_C_CST <- readRDS("BAT12Exh_MImodel_C_CST_final.RDS")
summary(pool(BAT12Exh_MImodel_C_CST))
                                 term      estimate   std.error  statistic
1                         (Intercept)  4.2468678934 0.916062063  4.6360046
2                 T1_BAT12_Exhaustion  0.5113304641 0.058508422  8.7394336
3                             T1_PSS4  0.1167204373 0.053350580  2.1878007
4                            Age_2024 -0.0456022164 0.031714458 -1.4378999
5                   T1_Gender_MWWoman  0.3171908681 0.274189812  1.1568295
6 T1_EducationMIUniversity (Bachelor)  0.1335487492 0.406192493  0.3287819
7 T1_EducationMIUniversity (Postgrad) -0.0941506142 0.458607338 -0.2052968
8            T1_EducationMIVocational  0.2240190774 0.505343697  0.4433004
9                    CST_switchcost.1  0.0002334835 0.000971841  0.2402486
         df      p.value
1 140.88070 8.021205e-06
2  90.04063 1.195352e-13
3 117.21960 3.066841e-02
4 125.47162 1.529519e-01
5 161.99735 2.490450e-01
6  92.82549 7.430611e-01
7 142.80547 8.376326e-01
8 202.98258 6.580206e-01
9  39.34304 8.113850e-01
Code
pool.r.squared(BAT12Exh_MImodel_C_CST)
          est     lo 95     hi 95       fmi
R^2 0.3857603 0.2938776 0.4750062 0.1999159
Code
pool.r.squared(BAT12Exh_MImodel_C_CST, adjusted = TRUE)
             est     lo 95     hi 95       fmi
adj R^2 0.370762 0.2785384 0.4610764 0.2064199
Code
summary(pool(BAT12Exh_MImodel_C_CST), conf.int = TRUE, conf.level = 0.95)
                                 term      estimate   std.error  statistic
1                         (Intercept)  4.2468678934 0.916062063  4.6360046
2                 T1_BAT12_Exhaustion  0.5113304641 0.058508422  8.7394336
3                             T1_PSS4  0.1167204373 0.053350580  2.1878007
4                            Age_2024 -0.0456022164 0.031714458 -1.4378999
5                   T1_Gender_MWWoman  0.3171908681 0.274189812  1.1568295
6 T1_EducationMIUniversity (Bachelor)  0.1335487492 0.406192493  0.3287819
7 T1_EducationMIUniversity (Postgrad) -0.0941506142 0.458607338 -0.2052968
8            T1_EducationMIVocational  0.2240190774 0.505343697  0.4433004
9                    CST_switchcost.1  0.0002334835 0.000971841  0.2402486
         df      p.value        2.5 %     97.5 %     conf.low  conf.high
1 140.88070 8.021205e-06  2.435862682 6.05787310  2.435862682 6.05787310
2  90.04063 1.195352e-13  0.395093987 0.62756694  0.395093987 0.62756694
3 117.21960 3.066841e-02  0.011064478 0.22237640  0.011064478 0.22237640
4 125.47162 1.529519e-01 -0.108366758 0.01716233 -0.108366758 0.01716233
5 161.99735 2.490450e-01 -0.224256149 0.85863789 -0.224256149 0.85863789
6  92.82549 7.430611e-01 -0.673089026 0.94018652 -0.673089026 0.94018652
7 142.80547 8.376326e-01 -1.000686699 0.81238547 -1.000686699 0.81238547
8 202.98258 6.580206e-01 -0.772377128 1.22041528 -0.772377128 1.22041528
9  39.34304 8.113850e-01 -0.001731703 0.00219867 -0.001731703 0.00219867
Code
#MI Model D - Coping Flex CFS
# BAT12Cog_MImodel_D_CFS <- with(imp, lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new))
BAT12Cog_MImodel_D_CFS <- readRDS("BAT12Cog_MImodel_D_CFS_final.RDS")
summary(pool(BAT12Cog_MImodel_D_CFS))
                                  term    estimate  std.error  statistic
1                          (Intercept)  3.06958791 1.09669410  2.7989463
2                   T1_BAT12_Cognitive  0.56528290 0.05601213 10.0921517
3                              T1_PSS4  0.11166049 0.05869252  1.9024656
4                             Age_2024 -0.01662714 0.03046046 -0.5458599
5                    T1_Gender_MWWoman  0.38801748 0.28911522  1.3420859
6  T1_EducationMIUniversity (Bachelor)  0.22043987 0.41390229  0.5325892
7  T1_EducationMIUniversity (Postgrad) -0.06529051 0.47017749 -0.1388635
8             T1_EducationMIVocational -0.14603592 0.52486680 -0.2782342
9                      T1_CFS_Adaptive  0.10063870 0.06073619  1.6569808
10               T1_CFS_Evaluation_new -0.24628182 0.09405785 -2.6184078
          df      p.value
1   92.33852 6.241856e-03
2   95.54249 9.903727e-17
3   82.40353 6.060346e-02
4  180.66169 5.858356e-01
5  120.20933 1.820975e-01
6   90.68660 5.956206e-01
7  130.40310 8.897722e-01
8  176.49989 7.811582e-01
9  114.91923 1.002511e-01
10 111.55079 1.006128e-02
Code
pool.r.squared(BAT12Cog_MImodel_D_CFS)
          est     lo 95     hi 95       fmi
R^2 0.4390221 0.3457051 0.5271131 0.2425077
Code
pool.r.squared(BAT12Cog_MImodel_D_CFS, adjusted = TRUE)
              est     lo 95     hi 95       fmi
adj R^2 0.4235649 0.3293763 0.5131501 0.2491236
Code
summary(pool(BAT12Cog_MImodel_D_CFS), conf.int = TRUE, conf.level = 0.95)
                                  term    estimate  std.error  statistic
1                          (Intercept)  3.06958791 1.09669410  2.7989463
2                   T1_BAT12_Cognitive  0.56528290 0.05601213 10.0921517
3                              T1_PSS4  0.11166049 0.05869252  1.9024656
4                             Age_2024 -0.01662714 0.03046046 -0.5458599
5                    T1_Gender_MWWoman  0.38801748 0.28911522  1.3420859
6  T1_EducationMIUniversity (Bachelor)  0.22043987 0.41390229  0.5325892
7  T1_EducationMIUniversity (Postgrad) -0.06529051 0.47017749 -0.1388635
8             T1_EducationMIVocational -0.14603592 0.52486680 -0.2782342
9                      T1_CFS_Adaptive  0.10063870 0.06073619  1.6569808
10               T1_CFS_Evaluation_new -0.24628182 0.09405785 -2.6184078
          df      p.value       2.5 %      97.5 %    conf.low   conf.high
1   92.33852 6.241856e-03  0.89156514  5.24761067  0.89156514  5.24761067
2   95.54249 9.903727e-17  0.45409291  0.67647289  0.45409291  0.67647289
3   82.40353 6.060346e-02 -0.00508906  0.22841005 -0.00508906  0.22841005
4  180.66169 5.858356e-01 -0.07673116  0.04347688 -0.07673116  0.04347688
5  120.20933 1.820975e-01 -0.18440039  0.96043535 -0.18440039  0.96043535
6   90.68660 5.956206e-01 -0.60176446  1.04264419 -0.60176446  1.04264419
7  130.40310 8.897722e-01 -0.99545343  0.86487242 -0.99545343  0.86487242
8  176.49989 7.811582e-01 -1.18185828  0.88978645 -1.18185828  0.88978645
9  114.91923 1.002511e-01 -0.01966890  0.22094630 -0.01966890  0.22094630
10 111.55079 1.006128e-02 -0.43265360 -0.05991004 -0.43265360 -0.05991004
Code
# BAT12Emo_MImodel_D_CFS <- with(imp, lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new))
BAT12Emo_MImodel_D_CFS <- readRDS("BAT12Emo_MImodel_D_CFS_final.RDS")
summary(pool(BAT12Emo_MImodel_D_CFS))
                                  term    estimate  std.error  statistic
1                          (Intercept)  3.15633671 0.96026906  3.2869295
2                     T1_BAT12_Emotion  0.58188737 0.06082275  9.5669364
3                              T1_PSS4  0.11601708 0.05397538  2.1494444
4                             Age_2024 -0.05949890 0.02932817 -2.0287289
5                    T1_Gender_MWWoman  0.21624382 0.28337946  0.7630892
6  T1_EducationMIUniversity (Bachelor)  0.48649251 0.35701200  1.3626783
7  T1_EducationMIUniversity (Postgrad)  0.41055353 0.45430091  0.9037039
8             T1_EducationMIVocational  0.64582508 0.49952746  1.2928720
9                      T1_CFS_Adaptive -0.04686149 0.05699316 -0.8222299
10               T1_CFS_Evaluation_new -0.01738566 0.08506618 -0.2043781
          df      p.value
1  125.00036 1.315106e-03
2  128.44706 1.064211e-16
3   90.86071 3.425648e-02
4  173.40949 4.401543e-02
5  105.19038 4.471182e-01
6  172.72380 1.747580e-01
7  125.62359 3.678821e-01
8  188.11962 1.976409e-01
9  130.13449 4.124500e-01
10 163.01068 8.383130e-01
Code
pool.r.squared(BAT12Emo_MImodel_D_CFS)
         est     lo 95     hi 95       fmi
R^2 0.377265 0.2715949 0.4800458 0.4035471
Code
pool.r.squared(BAT12Emo_MImodel_D_CFS, adjusted = TRUE)
              est     lo 95     hi 95       fmi
adj R^2 0.3600722 0.2536823 0.4647072 0.4149803
Code
summary(pool(BAT12Emo_MImodel_D_CFS), conf.int = TRUE, conf.level = 0.95)
                                  term    estimate  std.error  statistic
1                          (Intercept)  3.15633671 0.96026906  3.2869295
2                     T1_BAT12_Emotion  0.58188737 0.06082275  9.5669364
3                              T1_PSS4  0.11601708 0.05397538  2.1494444
4                             Age_2024 -0.05949890 0.02932817 -2.0287289
5                    T1_Gender_MWWoman  0.21624382 0.28337946  0.7630892
6  T1_EducationMIUniversity (Bachelor)  0.48649251 0.35701200  1.3626783
7  T1_EducationMIUniversity (Postgrad)  0.41055353 0.45430091  0.9037039
8             T1_EducationMIVocational  0.64582508 0.49952746  1.2928720
9                      T1_CFS_Adaptive -0.04686149 0.05699316 -0.8222299
10               T1_CFS_Evaluation_new -0.01738566 0.08506618 -0.2043781
          df      p.value        2.5 %       97.5 %     conf.low    conf.high
1  125.00036 1.315106e-03  1.255845120  5.056828292  1.255845120  5.056828292
2  128.44706 1.064211e-16  0.461543164  0.702231571  0.461543164  0.702231571
3   90.86071 3.425648e-02  0.008799402  0.223234759  0.008799402  0.223234759
4  173.40949 4.401543e-02 -0.117385025 -0.001612767 -0.117385025 -0.001612767
5  105.19038 4.471182e-01 -0.345633461  0.778121095 -0.345633461  0.778121095
6  172.72380 1.747580e-01 -0.218175485  1.191160512 -0.218175485  1.191160512
7  125.62359 3.678821e-01 -0.488520746  1.309627801 -0.488520746  1.309627801
8  188.11962 1.976409e-01 -0.339570035  1.631220202 -0.339570035  1.631220202
9  130.13449 4.124500e-01 -0.159614548  0.065891577 -0.159614548  0.065891577
10 163.01068 8.383130e-01 -0.185359344  0.150588024 -0.185359344  0.150588024
Code
# BAT12Ment_MImodel_D_CFS <- with(imp, lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new))
BAT12Ment_MImodel_D_CFS <- readRDS("BAT12Ment_MImodel_D_CFS_final.RDS")
summary(pool(BAT12Ment_MImodel_D_CFS))
                                  term    estimate  std.error  statistic
1                          (Intercept)  2.55872083 1.05394369  2.4277586
2              T1_BAT12_MentalDistance  0.60884898 0.05854322 10.3999917
3                              T1_PSS4  0.14141530 0.05965203  2.3706703
4                             Age_2024 -0.01784869 0.03256854 -0.5480348
5                    T1_Gender_MWWoman  0.05203547 0.28600917  0.1819364
6  T1_EducationMIUniversity (Bachelor)  0.25678143 0.39042944  0.6576897
7  T1_EducationMIUniversity (Postgrad) -0.32987128 0.49318853 -0.6688543
8             T1_EducationMIVocational  0.11026641 0.54435213  0.2025645
9                      T1_CFS_Adaptive  0.06605903 0.06625379  0.9970604
10               T1_CFS_Evaluation_new -0.13380875 0.09019745 -1.4835092
          df      p.value
1   94.30218 1.709034e-02
2  110.04183 4.687915e-18
3   90.96101 1.986693e-02
4  117.23479 5.847100e-01
5  121.82594 8.559351e-01
6  125.21713 5.119448e-01
7   97.99490 5.051610e-01
8  135.42242 8.397795e-01
9   73.09789 3.220244e-01
10 143.21816 1.401365e-01
Code
pool.r.squared(BAT12Ment_MImodel_D_CFS)
          est     lo 95     hi 95      fmi
R^2 0.4591844 0.3639946 0.5480104 0.285633
Code
pool.r.squared(BAT12Ment_MImodel_D_CFS, adjusted = TRUE)
              est     lo 95     hi 95       fmi
adj R^2 0.4442798 0.3479932 0.5347656 0.2926309
Code
summary(pool(BAT12Ment_MImodel_D_CFS), conf.int = TRUE, conf.level = 0.95)
                                  term    estimate  std.error  statistic
1                          (Intercept)  2.55872083 1.05394369  2.4277586
2              T1_BAT12_MentalDistance  0.60884898 0.05854322 10.3999917
3                              T1_PSS4  0.14141530 0.05965203  2.3706703
4                             Age_2024 -0.01784869 0.03256854 -0.5480348
5                    T1_Gender_MWWoman  0.05203547 0.28600917  0.1819364
6  T1_EducationMIUniversity (Bachelor)  0.25678143 0.39042944  0.6576897
7  T1_EducationMIUniversity (Postgrad) -0.32987128 0.49318853 -0.6688543
8             T1_EducationMIVocational  0.11026641 0.54435213  0.2025645
9                      T1_CFS_Adaptive  0.06605903 0.06625379  0.9970604
10               T1_CFS_Evaluation_new -0.13380875 0.09019745 -1.4835092
          df      p.value       2.5 %     97.5 %    conf.low  conf.high
1   94.30218 1.709034e-02  0.46617834 4.65126332  0.46617834 4.65126332
2  110.04183 4.687915e-18  0.49283055 0.72486740  0.49283055 0.72486740
3   90.96101 1.986693e-02  0.02292318 0.25990743  0.02292318 0.25990743
4  117.23479 5.847100e-01 -0.08234763 0.04665024 -0.08234763 0.04665024
5  121.82594 8.559351e-01 -0.51415636 0.61822730 -0.51415636 0.61822730
6  125.21713 5.119448e-01 -0.51591380 1.02947666 -0.51591380 1.02947666
7   97.99490 5.051610e-01 -1.30858851 0.64884595 -1.30858851 0.64884595
8  135.42242 8.397795e-01 -0.96626422 1.18679705 -0.96626422 1.18679705
9   73.09789 3.220244e-01 -0.06598160 0.19809966 -0.06598160 0.19809966
10 143.21816 1.401365e-01 -0.31209904 0.04448154 -0.31209904 0.04448154
Code
# BAT12Exh_MImodel_D_CFS <- with(imp, lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI + T1_CFS_Adaptive + T1_CFS_Evaluation_new))
BAT12Exh_MImodel_D_CFS <- readRDS("BAT12Exh_MImodel_D_CFS_final.RDS")
summary(pool(BAT12Exh_MImodel_D_CFS))
                                  term    estimate  std.error  statistic
1                          (Intercept)  4.07893146 1.02753162  3.9696408
2                  T1_BAT12_Exhaustion  0.49727889 0.05943104  8.3673255
3                              T1_PSS4  0.13142524 0.05555450  2.3656990
4                             Age_2024 -0.04773201 0.03141950 -1.5191845
5                    T1_Gender_MWWoman  0.31410730 0.27060772  1.1607477
6  T1_EducationMIUniversity (Bachelor)  0.18219626 0.40357327  0.4514577
7  T1_EducationMIUniversity (Postgrad) -0.09741046 0.45783203 -0.2127646
8             T1_EducationMIVocational  0.22770682 0.50702783  0.4491012
9                      T1_CFS_Adaptive  0.11794355 0.06007941  1.9631277
10               T1_CFS_Evaluation_new -0.14837554 0.08971524 -1.6538498
          df      p.value
1  126.63154 1.199126e-04
2   83.03505 1.200627e-12
3  106.28604 1.980868e-02
4  128.09095 1.311805e-01
5  168.94127 2.473821e-01
6   93.65613 6.527034e-01
7  138.51405 8.318234e-01
8  198.05346 6.538497e-01
9  115.09222 5.204366e-02
10 138.49533 1.004229e-01
Code
pool.r.squared(BAT12Exh_MImodel_D_CFS)
          est     lo 95     hi 95       fmi
R^2 0.3950284 0.3028493 0.4841085 0.2062563
Code
pool.r.squared(BAT12Exh_MImodel_D_CFS, adjusted = TRUE)
              est     lo 95     hi 95       fmi
adj R^2 0.3783588 0.2857032 0.4687026 0.2135864
Code
summary(pool(BAT12Exh_MImodel_D_CFS), conf.int = TRUE, conf.level = 0.95)
                                  term    estimate  std.error  statistic
1                          (Intercept)  4.07893146 1.02753162  3.9696408
2                  T1_BAT12_Exhaustion  0.49727889 0.05943104  8.3673255
3                              T1_PSS4  0.13142524 0.05555450  2.3656990
4                             Age_2024 -0.04773201 0.03141950 -1.5191845
5                    T1_Gender_MWWoman  0.31410730 0.27060772  1.1607477
6  T1_EducationMIUniversity (Bachelor)  0.18219626 0.40357327  0.4514577
7  T1_EducationMIUniversity (Postgrad) -0.09741046 0.45783203 -0.2127646
8             T1_EducationMIVocational  0.22770682 0.50702783  0.4491012
9                      T1_CFS_Adaptive  0.11794355 0.06007941  1.9631277
10               T1_CFS_Evaluation_new -0.14837554 0.08971524 -1.6538498
          df      p.value        2.5 %     97.5 %     conf.low  conf.high
1  126.63154 1.199126e-04  2.045574918 6.11228801  2.045574918 6.11228801
2   83.03505 1.200627e-12  0.379073671 0.61548411  0.379073671 0.61548411
3  106.28604 1.980868e-02  0.021286449 0.24156402  0.021286449 0.24156402
4  128.09095 1.311805e-01 -0.109900434 0.01443641 -0.109900434 0.01443641
5  168.94127 2.473821e-01 -0.220100860 0.84831545 -0.220100860 0.84831545
6   93.65613 6.527034e-01 -0.619146282 0.98353879 -0.619146282 0.98353879
7  138.51405 8.318234e-01 -1.002653631 0.80783271 -1.002653631 0.80783271
8  198.05346 6.538497e-01 -0.772159260 1.22757291 -0.772159260 1.22757291
9  115.09222 5.204366e-02 -0.001061183 0.23694829 -0.001061183 0.23694829
10 138.49533 1.004229e-01 -0.325764193 0.02901312 -0.325764193 0.02901312
Code
#MI Model E - All
# BAT12Cog_MImodel_E_all <- with(imp, lm(T2_BAT12_Cognitive ~ T1_BAT12_Cognitive + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
#                            + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse 
#                            + T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + T1_COPE_Religion 
#                            + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
#                            + T1_COPE_SelfBlame + T1_COPE_Planning + T1_COPE_Humor + T1_COPE_Acceptance
#                            + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1))
BAT12Cog_MImodel_E_all <- readRDS("BAT12Cog_MImodel_E_all_final.RDS")
summary(pool(BAT12Cog_MImodel_E_all))
                                  term      estimate   std.error   statistic
1                          (Intercept)  1.9660377051 1.151782598  1.70695208
2                   T1_BAT12_Cognitive  0.5471583690 0.058559296  9.34366365
3                              T1_PSS4  0.1032250694 0.064197932  1.60791892
4                             Age_2024 -0.0100429037 0.031022612 -0.32372851
5                    T1_Gender_MWWoman  0.2452862681 0.281705417  0.87071903
6  T1_EducationMIUniversity (Bachelor)  0.1490674995 0.407232948  0.36604970
7  T1_EducationMIUniversity (Postgrad) -0.2026722428 0.466546024 -0.43440997
8             T1_EducationMIVocational -0.2277380912 0.513448366 -0.44354624
9              T1_COPE_SelfDistraction -0.0018104367 0.117798607 -0.01536891
10                T1_COPE_ActiveCoping  0.0432158452 0.117971742  0.36632370
11                      T1_COPE_Denial -0.0380269168 0.133055449 -0.28579751
12                T1_COPE_SubstanceUse  0.0868732157 0.162285794  0.53531005
13       T1_COPE_UseOfEmotionalSupport  0.2796131914 0.155445050  1.79879122
14     T1_COPE_BehavioralDisengagement -0.0088857233 0.132553749 -0.06703487
15                    T1_COPE_Religion -0.0041102136 0.091269212 -0.04503396
16                     T1_COPE_Venting  0.1858555412 0.129786280  1.43201223
17    T1_COPE_UseOfInstrumentalSupport -0.2007165052 0.155273453 -1.29266466
18           T1_COPE_PositiveReframing  0.1268296758 0.102783327  1.23395185
19                   T1_COPE_SelfBlame  0.1172000755 0.097528783  1.20169731
20                    T1_COPE_Planning -0.1606055888 0.140936867 -1.13955697
21                       T1_COPE_Humor -0.0649741328 0.084556715 -0.76840890
22                  T1_COPE_Acceptance  0.0744691497 0.106848756  0.69695851
23                     T1_CFS_Adaptive  0.0715532502 0.064119376  1.11593804
24               T1_CFS_Evaluation_new -0.2790792296 0.091214030 -3.05960858
25                    CST_switchcost.1 -0.0007562648 0.000882326 -0.85712619
          df      p.value
1  121.00740 9.039576e-02
2   80.35242 1.786136e-14
3   72.51987 1.121983e-01
4  157.67951 7.465726e-01
5  158.55841 3.852239e-01
6   99.50777 7.151051e-01
7  138.77197 6.646655e-01
8  178.19589 6.579088e-01
9   72.06732 9.877803e-01
10 134.24624 7.147002e-01
11 109.49140 7.755732e-01
12  47.11275 5.949535e-01
13  76.53245 7.599423e-02
14  87.80362 9.467064e-01
15  92.56052 9.641773e-01
16 116.56713 1.548163e-01
17  96.12043 1.992257e-01
18 141.08194 2.192725e-01
19 184.33919 2.310224e-01
20  68.07769 2.584647e-01
21 116.14782 4.438039e-01
22 133.73442 4.870385e-01
23 120.96433 2.666606e-01
24 143.87284 2.644310e-03
25  53.79687 3.951774e-01
Code
pool.r.squared(BAT12Cog_MImodel_E_all)
         est     lo 95     hi 95       fmi
R^2 0.490934 0.3999121 0.5747825 0.2471951
Code
pool.r.squared(BAT12Cog_MImodel_E_all, adjusted = TRUE)
              est     lo 95     hi 95       fmi
adj R^2 0.4517333 0.3576208 0.5399554 0.2635208
Code
summary(pool(BAT12Cog_MImodel_E_all), conf.int = TRUE, conf.level = 0.95)
                                  term      estimate   std.error   statistic
1                          (Intercept)  1.9660377051 1.151782598  1.70695208
2                   T1_BAT12_Cognitive  0.5471583690 0.058559296  9.34366365
3                              T1_PSS4  0.1032250694 0.064197932  1.60791892
4                             Age_2024 -0.0100429037 0.031022612 -0.32372851
5                    T1_Gender_MWWoman  0.2452862681 0.281705417  0.87071903
6  T1_EducationMIUniversity (Bachelor)  0.1490674995 0.407232948  0.36604970
7  T1_EducationMIUniversity (Postgrad) -0.2026722428 0.466546024 -0.43440997
8             T1_EducationMIVocational -0.2277380912 0.513448366 -0.44354624
9              T1_COPE_SelfDistraction -0.0018104367 0.117798607 -0.01536891
10                T1_COPE_ActiveCoping  0.0432158452 0.117971742  0.36632370
11                      T1_COPE_Denial -0.0380269168 0.133055449 -0.28579751
12                T1_COPE_SubstanceUse  0.0868732157 0.162285794  0.53531005
13       T1_COPE_UseOfEmotionalSupport  0.2796131914 0.155445050  1.79879122
14     T1_COPE_BehavioralDisengagement -0.0088857233 0.132553749 -0.06703487
15                    T1_COPE_Religion -0.0041102136 0.091269212 -0.04503396
16                     T1_COPE_Venting  0.1858555412 0.129786280  1.43201223
17    T1_COPE_UseOfInstrumentalSupport -0.2007165052 0.155273453 -1.29266466
18           T1_COPE_PositiveReframing  0.1268296758 0.102783327  1.23395185
19                   T1_COPE_SelfBlame  0.1172000755 0.097528783  1.20169731
20                    T1_COPE_Planning -0.1606055888 0.140936867 -1.13955697
21                       T1_COPE_Humor -0.0649741328 0.084556715 -0.76840890
22                  T1_COPE_Acceptance  0.0744691497 0.106848756  0.69695851
23                     T1_CFS_Adaptive  0.0715532502 0.064119376  1.11593804
24               T1_CFS_Evaluation_new -0.2790792296 0.091214030 -3.05960858
25                    CST_switchcost.1 -0.0007562648 0.000882326 -0.85712619
          df      p.value        2.5 %       97.5 %     conf.low    conf.high
1  121.00740 9.039576e-02 -0.314218335  4.246293745 -0.314218335  4.246293745
2   80.35242 1.786136e-14  0.430629501  0.663687237  0.430629501  0.663687237
3   72.51987 1.121983e-01 -0.024735497  0.231185636 -0.024735497  0.231185636
4  157.67951 7.465726e-01 -0.071316379  0.051230571 -0.071316379  0.051230571
5  158.55841 3.852239e-01 -0.311092746  0.801665282 -0.311092746  0.801665282
6   99.50777 7.151051e-01 -0.658920014  0.957055013 -0.658920014  0.957055013
7  138.77197 6.646655e-01 -1.125129960  0.719785474 -1.125129960  0.719785474
8  178.19589 6.579088e-01 -1.240959660  0.785483477 -1.240959660  0.785483477
9   72.06732 9.877803e-01 -0.236633920  0.233013046 -0.236633920  0.233013046
10 134.24624 7.147002e-01 -0.190107805  0.276539495 -0.190107805  0.276539495
11 109.49140 7.755732e-01 -0.301725209  0.225671375 -0.301725209  0.225671375
12  47.11275 5.949535e-01 -0.239583068  0.413329499 -0.239583068  0.413329499
13  76.53245 7.599423e-02 -0.029947629  0.589174011 -0.029947629  0.589174011
14  87.80362 9.467064e-01 -0.272316658  0.254545211 -0.272316658  0.254545211
15  92.56052 9.641773e-01 -0.185364122  0.177143694 -0.185364122  0.177143694
16 116.56713 1.548163e-01 -0.071189360  0.442900442 -0.071189360  0.442900442
17  96.12043 1.992257e-01 -0.508926946  0.107493936 -0.508926946  0.107493936
18 141.08194 2.192725e-01 -0.076364897  0.330024249 -0.076364897  0.330024249
19 184.33919 2.310224e-01 -0.075216070  0.309616221 -0.075216070  0.309616221
20  68.07769 2.584647e-01 -0.441834917  0.120623739 -0.441834917  0.120623739
21 116.14782 4.438039e-01 -0.232447115  0.102498850 -0.232447115  0.102498850
22 133.73442 4.870385e-01 -0.136862896  0.285801195 -0.136862896  0.285801195
23 120.96433 2.666606e-01 -0.055388344  0.198494845 -0.055388344  0.198494845
24 143.87284 2.644310e-03 -0.459371958 -0.098786501 -0.459371958 -0.098786501
25  53.79687 3.951774e-01 -0.002525375  0.001012845 -0.002525375  0.001012845
Code
hist(resid(BAT12Cog_MImodel_E_all$analyses[[1]])) #normal

Code
hist(scale(resid(BAT12Cog_MImodel_E_all$analyses[[5]]))) #if there are outliers, they are under 5 (dataset 1-5) 

Code
#the outliers are "65352230e1c63943779a4a24" "1231"    

# BAT12Emo_MImodel_E_all <- with(imp, lm(T2_BAT12_Emotion ~ T1_BAT12_Emotion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
#                            + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse 
#                            + T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + T1_COPE_Religion 
#                            + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
#                            + T1_COPE_SelfBlame + T1_COPE_Planning + T1_COPE_Humor + T1_COPE_Acceptance
#                            + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1))
BAT12Emo_MImodel_E_all <- readRDS("BAT12Emo_MImodel_E_all_final.RDS")
summary(pool(BAT12Emo_MImodel_E_all))
                                  term      estimate    std.error  statistic
1                          (Intercept)  2.2130375433 1.1658055843  1.8982904
2                     T1_BAT12_Emotion  0.5629821419 0.0637546838  8.8304436
3                              T1_PSS4  0.0839324728 0.0600895704  1.3967894
4                             Age_2024 -0.0549255508 0.0298260695 -1.8415283
5                    T1_Gender_MWWoman  0.2366645905 0.2825834823  0.8375033
6  T1_EducationMIUniversity (Bachelor)  0.4830602912 0.3556602592  1.3582071
7  T1_EducationMIUniversity (Postgrad)  0.3935761416 0.4531961800  0.8684454
8             T1_EducationMIVocational  0.5963387979 0.4926257451  1.2105311
9              T1_COPE_SelfDistraction -0.0304101082 0.1191051125 -0.2553216
10                T1_COPE_ActiveCoping  0.0699551998 0.1127199545  0.6206106
11                      T1_COPE_Denial -0.0862059455 0.1334863459 -0.6458035
12                T1_COPE_SubstanceUse  0.3111656816 0.1492504395  2.0848560
13       T1_COPE_UseOfEmotionalSupport  0.0531820183 0.1372601427  0.3874542
14     T1_COPE_BehavioralDisengagement  0.0396011366 0.1261371262  0.3139531
15                    T1_COPE_Religion -0.0286044114 0.0892649637 -0.3204439
16                     T1_COPE_Venting  0.0857171670 0.1257826319  0.6814706
17    T1_COPE_UseOfInstrumentalSupport  0.0284732241 0.1409495634  0.2020100
18           T1_COPE_PositiveReframing  0.0773621729 0.1063579795  0.7273754
19                   T1_COPE_SelfBlame  0.0972857387 0.0980311791  0.9923959
20                    T1_COPE_Planning -0.1543696340 0.1262590582 -1.2226421
21                       T1_COPE_Humor  0.0372529146 0.0800874505  0.4651530
22                  T1_COPE_Acceptance -0.0840315482 0.1026597673 -0.8185441
23                     T1_CFS_Adaptive -0.0533282818 0.0584824845 -0.9118676
24               T1_CFS_Evaluation_new -0.0249939967 0.0850680227 -0.2938119
25                    CST_switchcost.1  0.0002782308 0.0007829558  0.3553595
          df      p.value
1   85.14196 6.104579e-02
2  131.28512 5.755643e-15
3   81.45116 1.662712e-01
4  160.41260 6.739097e-02
5  119.55500 4.039808e-01
6  184.18123 1.760594e-01
7  132.24939 3.867238e-01
8  186.34518 2.276083e-01
9   57.64374 7.993835e-01
10 139.68609 5.358671e-01
11  92.26937 5.200095e-01
12  54.44160 4.178627e-02
13 137.29228 6.990200e-01
14  94.77460 7.542467e-01
15  87.05681 7.493998e-01
16 115.37740 4.969393e-01
17 154.35103 8.401749e-01
18  93.91541 4.688055e-01
19 138.72422 3.227323e-01
20  95.99720 2.244582e-01
21 129.51206 6.426031e-01
22 137.39896 4.144639e-01
23 173.24834 3.631055e-01
24 179.75683 7.692406e-01
25  74.04243 7.233306e-01
Code
pool.r.squared(BAT12Emo_MImodel_E_all)
          est     lo 95     hi 95       fmi
R^2 0.4285311 0.3143513 0.5357279 0.4979381
Code
pool.r.squared(BAT12Emo_MImodel_E_all, adjusted = TRUE)
              est     lo 95     hi 95       fmi
adj R^2 0.3843953 0.2666942 0.4979988 0.5250908
Code
summary(pool(BAT12Emo_MImodel_E_all), conf.int = TRUE, conf.level = 0.95)
                                  term      estimate    std.error  statistic
1                          (Intercept)  2.2130375433 1.1658055843  1.8982904
2                     T1_BAT12_Emotion  0.5629821419 0.0637546838  8.8304436
3                              T1_PSS4  0.0839324728 0.0600895704  1.3967894
4                             Age_2024 -0.0549255508 0.0298260695 -1.8415283
5                    T1_Gender_MWWoman  0.2366645905 0.2825834823  0.8375033
6  T1_EducationMIUniversity (Bachelor)  0.4830602912 0.3556602592  1.3582071
7  T1_EducationMIUniversity (Postgrad)  0.3935761416 0.4531961800  0.8684454
8             T1_EducationMIVocational  0.5963387979 0.4926257451  1.2105311
9              T1_COPE_SelfDistraction -0.0304101082 0.1191051125 -0.2553216
10                T1_COPE_ActiveCoping  0.0699551998 0.1127199545  0.6206106
11                      T1_COPE_Denial -0.0862059455 0.1334863459 -0.6458035
12                T1_COPE_SubstanceUse  0.3111656816 0.1492504395  2.0848560
13       T1_COPE_UseOfEmotionalSupport  0.0531820183 0.1372601427  0.3874542
14     T1_COPE_BehavioralDisengagement  0.0396011366 0.1261371262  0.3139531
15                    T1_COPE_Religion -0.0286044114 0.0892649637 -0.3204439
16                     T1_COPE_Venting  0.0857171670 0.1257826319  0.6814706
17    T1_COPE_UseOfInstrumentalSupport  0.0284732241 0.1409495634  0.2020100
18           T1_COPE_PositiveReframing  0.0773621729 0.1063579795  0.7273754
19                   T1_COPE_SelfBlame  0.0972857387 0.0980311791  0.9923959
20                    T1_COPE_Planning -0.1543696340 0.1262590582 -1.2226421
21                       T1_COPE_Humor  0.0372529146 0.0800874505  0.4651530
22                  T1_COPE_Acceptance -0.0840315482 0.1026597673 -0.8185441
23                     T1_CFS_Adaptive -0.0533282818 0.0584824845 -0.9118676
24               T1_CFS_Evaluation_new -0.0249939967 0.0850680227 -0.2938119
25                    CST_switchcost.1  0.0002782308 0.0007829558  0.3553595
          df      p.value        2.5 %      97.5 %     conf.low   conf.high
1   85.14196 6.104579e-02 -0.104840496 4.530915582 -0.104840496 4.530915582
2  131.28512 5.755643e-15  0.436862723 0.689101561  0.436862723 0.689101561
3   81.45116 1.662712e-01 -0.035616885 0.203481831 -0.035616885 0.203481831
4  160.41260 6.739097e-02 -0.113827948 0.003976846 -0.113827948 0.003976846
5  119.55500 4.039808e-01 -0.322852249 0.796181430 -0.322852249 0.796181430
6  184.18123 1.760594e-01 -0.218631683 1.184752265 -0.218631683 1.184752265
7  132.24939 3.867238e-01 -0.502875059 1.290027342 -0.502875059 1.290027342
8  186.34518 2.276083e-01 -0.375501540 1.568179136 -0.375501540 1.568179136
9   57.64374 7.993835e-01 -0.268856270 0.208036054 -0.268856270 0.208036054
10 139.68609 5.358671e-01 -0.152902572 0.292812971 -0.152902572 0.292812971
11  92.26937 5.200095e-01 -0.351311039 0.178899148 -0.351311039 0.178899148
12  54.44160 4.178627e-02  0.011992144 0.610339219  0.011992144 0.610339219
13 137.29228 6.990200e-01 -0.218235324 0.324599360 -0.218235324 0.324599360
14  94.77460 7.542467e-01 -0.210820401 0.290022675 -0.210820401 0.290022675
15  87.05681 7.493998e-01 -0.206026560 0.148817737 -0.206026560 0.148817737
16 115.37740 4.969393e-01 -0.163425354 0.334859688 -0.163425354 0.334859688
17 154.35103 8.401749e-01 -0.249965940 0.306912389 -0.249965940 0.306912389
18  93.91541 4.688055e-01 -0.133816568 0.288540914 -0.133816568 0.288540914
19 138.72422 3.227323e-01 -0.096542709 0.291114186 -0.096542709 0.291114186
20  95.99720 2.244582e-01 -0.404991977 0.096252709 -0.404991977 0.096252709
21 129.51206 6.426031e-01 -0.121196136 0.195701966 -0.121196136 0.195701966
22 137.39896 4.144639e-01 -0.287028924 0.118965828 -0.287028924 0.118965828
23 173.24834 3.631055e-01 -0.168758168 0.062101604 -0.168758168 0.062101604
24 179.75683 7.692406e-01 -0.192854378 0.142866385 -0.192854378 0.142866385
25  74.04243 7.233306e-01 -0.001281828 0.001838289 -0.001281828 0.001838289
Code
hist(resid(BAT12Emo_MImodel_E_all$analyses[[1]])) #normal

Code
hist(scale(resid(BAT12Emo_MImodel_E_all$analyses[[2]]))) #if there are outliers, they are under 5 (dataset 1-5) 

Code
#"1187" "1231"

# BAT12Ment_MImodel_E_all <- with(imp, lm(T2_BAT12_MentalDistance ~ T1_BAT12_MentalDistance + T1_PSS4 + Age_2024 + T1_Gender_MW 
#                             + T1_EducationMI + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse 
#                            + T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + T1_COPE_Religion 
#                            + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
#                            + T1_COPE_SelfBlame + T1_COPE_Planning + T1_COPE_Humor + T1_COPE_Acceptance
#                            + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1))
BAT12Ment_MImodel_E_all <- readRDS("BAT12Ment_MImodel_E_all_final.RDS")
summary(pool(BAT12Ment_MImodel_E_all))
                                  term      estimate    std.error   statistic
1                          (Intercept)  1.9957533468 1.1437090429  1.74498345
2              T1_BAT12_MentalDistance  0.5857860401 0.0600125324  9.76106185
3                              T1_PSS4  0.1113430615 0.0663356059  1.67848111
4                             Age_2024 -0.0215315858 0.0317734696 -0.67765926
5                    T1_Gender_MWWoman -0.1204967938 0.2804356674 -0.42967713
6  T1_EducationMIUniversity (Bachelor)  0.3212754183 0.3901571323  0.82345135
7  T1_EducationMIUniversity (Postgrad) -0.2322858093 0.4836955162 -0.48023147
8             T1_EducationMIVocational  0.0823167778 0.5307755442  0.15508774
9              T1_COPE_SelfDistraction -0.0571997933 0.1181822984 -0.48399628
10                T1_COPE_ActiveCoping  0.0874733788 0.1289270942  0.67847165
11                      T1_COPE_Denial -0.0939637418 0.1236052605 -0.76019209
12                T1_COPE_SubstanceUse  0.2521469363 0.1578066325  1.59782217
13       T1_COPE_UseOfEmotionalSupport  0.2330452019 0.1564786256  1.48931013
14     T1_COPE_BehavioralDisengagement  0.2569577317 0.1241293716  2.07008002
15                    T1_COPE_Religion -0.0926586461 0.0921848002 -1.00514017
16                     T1_COPE_Venting -0.0290241950 0.1177511645 -0.24648754
17    T1_COPE_UseOfInstrumentalSupport -0.1074009856 0.1533816527 -0.70022055
18           T1_COPE_PositiveReframing -0.0022529944 0.1075830380 -0.02094191
19                   T1_COPE_SelfBlame  0.1674495489 0.0994127179  1.68438760
20                    T1_COPE_Planning -0.1138479604 0.1343908794 -0.84714053
21                       T1_COPE_Humor -0.1327640373 0.0904575839 -1.46769382
22                  T1_COPE_Acceptance -0.0072540911 0.1084695175 -0.06687677
23                     T1_CFS_Adaptive  0.0835236559 0.0717765341  1.16366243
24               T1_CFS_Evaluation_new -0.1268936293 0.0918401500 -1.38167925
25                    CST_switchcost.1 -0.0002999512 0.0007808511 -0.38413372
          df      p.value
1  106.09351 8.388331e-02
2  104.71733 2.160986e-16
3   71.46780 9.762103e-02
4  128.42702 4.992068e-01
5  142.20801 6.680809e-01
6  120.12364 4.118832e-01
7  106.45056 6.320482e-01
8  130.57696 8.769916e-01
9   65.30123 6.300077e-01
10  75.40344 4.995497e-01
11 158.81796 4.482668e-01
12  48.86130 1.165303e-01
13  71.94702 1.407764e-01
14 118.29146 4.062149e-02
15  82.03211 3.177851e-01
16 215.67945 8.055393e-01
17  97.33657 4.854599e-01
18  98.26288 9.833345e-01
19 148.61539 9.420581e-02
20  78.68792 3.994860e-01
21  73.08897 1.464777e-01
22 113.16613 9.467978e-01
23  63.96630 2.488831e-01
24 127.44244 1.694876e-01
25  83.76337 7.018528e-01
Code
pool.r.squared(BAT12Ment_MImodel_E_all)
          est     lo 95     hi 95       fmi
R^2 0.5199883 0.4215599 0.6086792 0.3862641
Code
pool.r.squared(BAT12Ment_MImodel_E_all, adjusted = TRUE)
              est     lo 95     hi 95       fmi
adj R^2 0.4829965 0.3802582 0.5771177 0.4052358
Code
summary(pool(BAT12Ment_MImodel_E_all), conf.int = TRUE, conf.level = 0.95)
                                  term      estimate    std.error   statistic
1                          (Intercept)  1.9957533468 1.1437090429  1.74498345
2              T1_BAT12_MentalDistance  0.5857860401 0.0600125324  9.76106185
3                              T1_PSS4  0.1113430615 0.0663356059  1.67848111
4                             Age_2024 -0.0215315858 0.0317734696 -0.67765926
5                    T1_Gender_MWWoman -0.1204967938 0.2804356674 -0.42967713
6  T1_EducationMIUniversity (Bachelor)  0.3212754183 0.3901571323  0.82345135
7  T1_EducationMIUniversity (Postgrad) -0.2322858093 0.4836955162 -0.48023147
8             T1_EducationMIVocational  0.0823167778 0.5307755442  0.15508774
9              T1_COPE_SelfDistraction -0.0571997933 0.1181822984 -0.48399628
10                T1_COPE_ActiveCoping  0.0874733788 0.1289270942  0.67847165
11                      T1_COPE_Denial -0.0939637418 0.1236052605 -0.76019209
12                T1_COPE_SubstanceUse  0.2521469363 0.1578066325  1.59782217
13       T1_COPE_UseOfEmotionalSupport  0.2330452019 0.1564786256  1.48931013
14     T1_COPE_BehavioralDisengagement  0.2569577317 0.1241293716  2.07008002
15                    T1_COPE_Religion -0.0926586461 0.0921848002 -1.00514017
16                     T1_COPE_Venting -0.0290241950 0.1177511645 -0.24648754
17    T1_COPE_UseOfInstrumentalSupport -0.1074009856 0.1533816527 -0.70022055
18           T1_COPE_PositiveReframing -0.0022529944 0.1075830380 -0.02094191
19                   T1_COPE_SelfBlame  0.1674495489 0.0994127179  1.68438760
20                    T1_COPE_Planning -0.1138479604 0.1343908794 -0.84714053
21                       T1_COPE_Humor -0.1327640373 0.0904575839 -1.46769382
22                  T1_COPE_Acceptance -0.0072540911 0.1084695175 -0.06687677
23                     T1_CFS_Adaptive  0.0835236559 0.0717765341  1.16366243
24               T1_CFS_Evaluation_new -0.1268936293 0.0918401500 -1.38167925
25                    CST_switchcost.1 -0.0002999512 0.0007808511 -0.38413372
          df      p.value        2.5 %      97.5 %     conf.low   conf.high
1  106.09351 8.388331e-02 -0.271737996 4.263244689 -0.271737996 4.263244689
2  104.71733 2.160986e-16  0.466788530 0.704783550  0.466788530 0.704783550
3   71.46780 9.762103e-02 -0.020911378 0.243597501 -0.020911378 0.243597501
4  128.42702 4.992068e-01 -0.084398829 0.041335658 -0.084398829 0.041335658
5  142.20801 6.680809e-01 -0.674858135 0.433864548 -0.674858135 0.433864548
6  120.12364 4.118832e-01 -0.451200453 1.093751289 -0.451200453 1.093751289
7  106.45056 6.320482e-01 -1.191212358 0.726640739 -1.191212358 0.726640739
8  130.57696 8.769916e-01 -0.967715572 1.132349128 -0.967715572 1.132349128
9   65.30123 6.300077e-01 -0.293205503 0.178805916 -0.293205503 0.178805916
10  75.40344 4.995497e-01 -0.169340041 0.344286799 -0.169340041 0.344286799
11 158.81796 4.482668e-01 -0.338085809 0.150158325 -0.338085809 0.150158325
12  48.86130 1.165303e-01 -0.065000136 0.569294009 -0.065000136 0.569294009
13  71.94702 1.407764e-01 -0.078893161 0.544983565 -0.078893161 0.544983565
14 118.29146 4.062149e-02  0.011154056 0.502761408  0.011154056 0.502761408
15  82.03211 3.177851e-01 -0.276042505 0.090725213 -0.276042505 0.090725213
16 215.67945 8.055393e-01 -0.261114563 0.203066174 -0.261114563 0.203066174
17  97.33657 4.854599e-01 -0.411807815 0.197005844 -0.411807815 0.197005844
18  98.26288 9.833345e-01 -0.215740894 0.211234905 -0.215740894 0.211234905
19 148.61539 9.420581e-02 -0.028995454 0.363894552 -0.028995454 0.363894552
20  78.68792 3.994860e-01 -0.381362811 0.153666891 -0.381362811 0.153666891
21  73.08897 1.464777e-01 -0.313042045 0.047513970 -0.313042045 0.047513970
22 113.16613 9.467978e-01 -0.222148355 0.207640172 -0.222148355 0.207640172
23  63.96630 2.488831e-01 -0.059867909 0.226915221 -0.059867909 0.226915221
24 127.44244 1.694876e-01 -0.308622644 0.054835385 -0.308622644 0.054835385
25  83.76337 7.018528e-01 -0.001852823 0.001252921 -0.001852823 0.001252921
Code
hist(resid(BAT12Ment_MImodel_E_all$analyses[[1]])) #normal

Code
hist(scale(resid(BAT12Ment_MImodel_E_all$analyses[[4]]))) #if there are outliers, they are under 5 (dataset 1-5) 

Code
#"1187" "1231"

# BAT12Exh_MImodel_E_all <- with(imp, lm(T2_BAT12_Exhaustion ~ T1_BAT12_Exhaustion + T1_PSS4 + Age_2024 + T1_Gender_MW + T1_EducationMI
#                            + T1_COPE_SelfDistraction + T1_COPE_ActiveCoping+ T1_COPE_Denial + T1_COPE_SubstanceUse 
#                            + T1_COPE_UseOfEmotionalSupport + T1_COPE_BehavioralDisengagement + T1_COPE_Religion 
#                            + T1_COPE_Venting + T1_COPE_UseOfInstrumentalSupport + T1_COPE_PositiveReframing 
#                            + T1_COPE_SelfBlame + T1_COPE_Planning + T1_COPE_Humor + T1_COPE_Acceptance
#                            + T1_CFS_Adaptive + T1_CFS_Evaluation_new + CST_switchcost.1))
BAT12Exh_MImodel_E_all <- readRDS("BAT12Exh_MImodel_E_all_final.RDS")
summary(pool(BAT12Exh_MImodel_E_all))
                                  term     estimate    std.error   statistic
1                          (Intercept)  3.088323007 1.1007652927  2.80561445
2                  T1_BAT12_Exhaustion  0.469844895 0.0582872394  8.06085345
3                              T1_PSS4  0.067949744 0.0592311283  1.14719652
4                             Age_2024 -0.048274251 0.0311121102 -1.55162251
5                    T1_Gender_MWWoman  0.144509755 0.2622014644  0.55114015
6  T1_EducationMIUniversity (Bachelor)  0.298544444 0.3969008844  0.75218891
7  T1_EducationMIUniversity (Postgrad) -0.026751239 0.4518897442 -0.05919860
8             T1_EducationMIVocational  0.285117756 0.4930661898  0.57825453
9              T1_COPE_SelfDistraction  0.160760736 0.1068897184  1.50398690
10                T1_COPE_ActiveCoping -0.027688016 0.1191970758 -0.23228771
11                      T1_COPE_Denial -0.130665726 0.1253552214 -1.04236365
12                T1_COPE_SubstanceUse -0.023855491 0.1425838746 -0.16730848
13       T1_COPE_UseOfEmotionalSupport  0.120662544 0.1474838967  0.81814047
14     T1_COPE_BehavioralDisengagement  0.405878897 0.1168496523  3.47351395
15                    T1_COPE_Religion -0.051908170 0.0901008863 -0.57611165
16                     T1_COPE_Venting -0.024306835 0.1348019421 -0.18031517
17    T1_COPE_UseOfInstrumentalSupport -0.125936424 0.1444879071 -0.87160529
18           T1_COPE_PositiveReframing -0.075713020 0.1065393632 -0.71065771
19                   T1_COPE_SelfBlame  0.116655927 0.0991933609  1.17604572
20                    T1_COPE_Planning  0.033188153 0.1278841697  0.25951729
21                       T1_COPE_Humor  0.005590397 0.0792869435  0.07050842
22                  T1_COPE_Acceptance -0.032307332 0.1164490251 -0.27743755
23                     T1_CFS_Adaptive  0.126388159 0.0626178805  2.01840366
24               T1_CFS_Evaluation_new -0.110413134 0.0927045311 -1.19102197
25                    CST_switchcost.1  0.000533243 0.0009609529  0.55491067
          df      p.value
1  135.36856 5.762718e-03
2   91.32972 2.806003e-12
3  110.58984 2.537762e-01
4  125.85653 1.232636e-01
5  211.59777 5.821191e-01
6   96.71298 4.537643e-01
7  142.81777 9.528767e-01
8  191.12796 5.637730e-01
9   98.23147 1.357932e-01
10 104.91150 8.167671e-01
11 131.03342 2.991625e-01
12  66.61362 8.676342e-01
13  86.94627 4.155135e-01
14 155.42215 6.656434e-04
15  86.89639 5.660289e-01
16  80.86749 8.573563e-01
17 122.80983 3.851245e-01
18  95.21980 4.790334e-01
19 134.87381 2.416483e-01
20  92.67130 7.958118e-01
21 137.07103 9.438918e-01
22  73.04614 7.822278e-01
23 116.87226 4.583877e-02
24 111.63493 2.361712e-01
25  38.12957 5.821966e-01
Code
pool.r.squared(BAT12Exh_MImodel_E_all)
          est    lo 95     hi 95       fmi
R^2 0.4642237 0.372678 0.5496495 0.2305444
Code
pool.r.squared(BAT12Exh_MImodel_E_all, adjusted = TRUE)
             est     lo 95     hi 95       fmi
adj R^2 0.422966 0.3288545 0.5125092 0.2476005
Code
summary(pool(BAT12Exh_MImodel_E_all), conf.int = TRUE, conf.level = 0.95)
                                  term     estimate    std.error   statistic
1                          (Intercept)  3.088323007 1.1007652927  2.80561445
2                  T1_BAT12_Exhaustion  0.469844895 0.0582872394  8.06085345
3                              T1_PSS4  0.067949744 0.0592311283  1.14719652
4                             Age_2024 -0.048274251 0.0311121102 -1.55162251
5                    T1_Gender_MWWoman  0.144509755 0.2622014644  0.55114015
6  T1_EducationMIUniversity (Bachelor)  0.298544444 0.3969008844  0.75218891
7  T1_EducationMIUniversity (Postgrad) -0.026751239 0.4518897442 -0.05919860
8             T1_EducationMIVocational  0.285117756 0.4930661898  0.57825453
9              T1_COPE_SelfDistraction  0.160760736 0.1068897184  1.50398690
10                T1_COPE_ActiveCoping -0.027688016 0.1191970758 -0.23228771
11                      T1_COPE_Denial -0.130665726 0.1253552214 -1.04236365
12                T1_COPE_SubstanceUse -0.023855491 0.1425838746 -0.16730848
13       T1_COPE_UseOfEmotionalSupport  0.120662544 0.1474838967  0.81814047
14     T1_COPE_BehavioralDisengagement  0.405878897 0.1168496523  3.47351395
15                    T1_COPE_Religion -0.051908170 0.0901008863 -0.57611165
16                     T1_COPE_Venting -0.024306835 0.1348019421 -0.18031517
17    T1_COPE_UseOfInstrumentalSupport -0.125936424 0.1444879071 -0.87160529
18           T1_COPE_PositiveReframing -0.075713020 0.1065393632 -0.71065771
19                   T1_COPE_SelfBlame  0.116655927 0.0991933609  1.17604572
20                    T1_COPE_Planning  0.033188153 0.1278841697  0.25951729
21                       T1_COPE_Humor  0.005590397 0.0792869435  0.07050842
22                  T1_COPE_Acceptance -0.032307332 0.1164490251 -0.27743755
23                     T1_CFS_Adaptive  0.126388159 0.0626178805  2.01840366
24               T1_CFS_Evaluation_new -0.110413134 0.0927045311 -1.19102197
25                    CST_switchcost.1  0.000533243 0.0009609529  0.55491067
          df      p.value        2.5 %      97.5 %     conf.low   conf.high
1  135.36856 5.762718e-03  0.911401589 5.265244426  0.911401589 5.265244426
2   91.32972 2.806003e-12  0.354070085 0.585619705  0.354070085 0.585619705
3  110.58984 2.537762e-01 -0.049425488 0.185324976 -0.049425488 0.185324976
4  125.85653 1.232636e-01 -0.109844883 0.013296381 -0.109844883 0.013296381
5  211.59777 5.821191e-01 -0.372351872 0.661371383 -0.372351872 0.661371383
6   96.71298 4.537643e-01 -0.489223469 1.086312357 -0.489223469 1.086312357
7  142.81777 9.528767e-01 -0.920007897 0.866505418 -0.920007897 0.866505418
8  191.12796 5.637730e-01 -0.687432410 1.257667923 -0.687432410 1.257667923
9   98.23147 1.357932e-01 -0.051352184 0.372873657 -0.051352184 0.372873657
10 104.91150 8.167671e-01 -0.264036122 0.208660090 -0.264036122 0.208660090
11 131.03342 2.991625e-01 -0.378647667 0.117316214 -0.378647667 0.117316214
12  66.61362 8.676342e-01 -0.308484444 0.260773461 -0.308484444 0.260773461
13  86.94627 4.155135e-01 -0.172480225 0.413805313 -0.172480225 0.413805313
14 155.42215 6.656434e-04  0.175060530 0.636697264  0.175060530 0.636697264
15  86.89639 5.660289e-01 -0.230996449 0.127180108 -0.230996449 0.127180108
16  80.86749 8.573563e-01 -0.292527078 0.243913408 -0.292527078 0.243913408
17 122.80983 3.851245e-01 -0.411945776 0.160072929 -0.411945776 0.160072929
18  95.21980 4.790334e-01 -0.287214100 0.135788061 -0.287214100 0.135788061
19 134.87381 2.416483e-01 -0.079519677 0.312831531 -0.079519677 0.312831531
20  92.67130 7.958118e-01 -0.220776335 0.287152640 -0.220776335 0.287152640
21 137.07103 9.438918e-01 -0.151193356 0.162374150 -0.151193356 0.162374150
22  73.04614 7.822278e-01 -0.264387435 0.199772770 -0.264387435 0.199772770
23 116.87226 4.583877e-02  0.002375312 0.250401006  0.002375312 0.250401006
24 111.63493 2.361712e-01 -0.294101838 0.073275571 -0.294101838 0.073275571
25  38.12957 5.821966e-01 -0.001411887 0.002478374 -0.001411887 0.002478374
Code
hist(resid(BAT12Exh_MImodel_E_all$analyses[[1]])) 

Code
hist(scale(resid(BAT12Exh_MImodel_E_all$analyses[[5]]))) #mostly no outliers, if present, around 3

Code
#"1265"

9 Compare Models

Code
#D1 comparison (multivariate Wald test)
#A to B
# Full model
fit_full <- BAT12Cog_MImodel_B_ERall  # model with more predictors
# Reduced model
fit_reduced <- BAT12Cog_MImodel_A_Cov  # nested model
# Run D1 test
BAT12Cog_MImodelAB_comparison <- mice::D1(fit_full, fit_reduced)
# View results
print(BAT12Cog_MImodelAB_comparison)
   test statistic df1      df2 dfcom   p.value       riv
 1 ~~ 2 0.9238702  14 271.3382   315 0.5334374 0.5195551
Code
# Full model
fit_full <- BAT12Emo_MImodel_B_ERall  # model with more predictors
# Reduced model
fit_reduced <- BAT12Emo_MImodel_A_Cov  # nested model
# Run D1 test
BAT12Emo_MImodelAB_comparison <- mice::D1(fit_full, fit_reduced)
# View results
print(BAT12Emo_MImodelAB_comparison)
   test statistic df1      df2 dfcom   p.value       riv
 1 ~~ 2 0.9291621  14 268.9007   315 0.5277538 0.5463657
Code
# Full model
fit_full <- BAT12Ment_MImodel_B_ERall  # model with more predictors
# Reduced model
fit_reduced <- BAT12Ment_MImodel_A_Cov  # nested model
# Run D1 test
BAT12Ment_MImodelAB_comparison <- mice::D1(fit_full, fit_reduced)
# View results
print(BAT12Ment_MImodelAB_comparison)
   test statistic df1      df2 dfcom   p.value       riv
 1 ~~ 2  1.412079  14 266.8593   315 0.1468747 0.5692143
Code
# Full model
fit_full <- BAT12Exh_MImodel_B_ERall  # model with more predictors
# Reduced model
fit_reduced <- BAT12Exh_MImodel_A_Cov  # nested model
# Run D1 test
BAT12Exh_MImodelAB_comparison <- mice::D1(fit_full, fit_reduced)
# View results
print(BAT12Exh_MImodelAB_comparison)
   test statistic df1      df2 dfcom  p.value       riv
 1 ~~ 2  1.480536  14 271.4567   315 0.117709 0.5182642
Code
#A to C
# Full model
fit_full <- BAT12Cog_MImodel_C_CST  # model with more predictors
# Reduced model
fit_reduced <- BAT12Cog_MImodel_A_Cov  # nested model
# Run D1 test
BAT12Cog_MImodelAC_comparison <- mice::D1(fit_full, fit_reduced)
# View results
print(BAT12Cog_MImodelAC_comparison)
   test statistic df1      df2 dfcom   p.value      riv
 1 ~~ 2 0.8371113   1 41.07977   328 0.3655638 1.179227
Code
# Full model
fit_full <- BAT12Emo_MImodel_C_CST  # model with more predictors
# Reduced model
fit_reduced <- BAT12Emo_MImodel_A_Cov  # nested model
# Run D1 test
BAT12Emo_MImodelAC_comparison <- mice::D1(fit_full, fit_reduced)
# View results
print(BAT12Emo_MImodelAC_comparison)
   test   statistic df1     df2 dfcom   p.value       riv
 1 ~~ 2 0.002818184   1 58.0746   328 0.9578451 0.7656979
Code
# Full model
fit_full <- BAT12Ment_MImodel_C_CST  # model with more predictors
# Reduced model
fit_reduced <- BAT12Ment_MImodel_A_Cov  # nested model
# Run D1 test
BAT12Ment_MImodelAC_comparison <- mice::D1(fit_full, fit_reduced)
# View results
print(BAT12Ment_MImodelAC_comparison)
   test statistic df1     df2 dfcom   p.value       riv
 1 ~~ 2 0.8659138   1 86.0677   328 0.3546918 0.4956891
Code
# Full model
fit_full <- BAT12Exh_MImodel_C_CST  # model with more predictors
# Reduced model
fit_reduced <- BAT12Exh_MImodel_A_Cov  # nested model
# Run D1 test
BAT12Exh_MImodelAC_comparison <- mice::D1(fit_full, fit_reduced)
# View results
print(BAT12Exh_MImodelAC_comparison)
   test statistic df1      df2 dfcom   p.value      riv
 1 ~~ 2 0.0577194   1 36.20136   328 0.8114928 1.410699
Code
#A to D
# Full model
fit_full <- BAT12Cog_MImodel_D_CFS  # model with more predictors
# Reduced model
fit_reduced <- BAT12Cog_MImodel_A_Cov  # nested model
# Run D1 test
BAT12Cog_MImodelAD_comparison <- mice::D1(fit_full, fit_reduced)
# View results
print(BAT12Cog_MImodelAD_comparison)
   test statistic df1      df2 dfcom  p.value      riv
 1 ~~ 2  3.289335   2 153.7383   327 0.039919 0.479417
Code
# Full model
fit_full <- BAT12Emo_MImodel_D_CFS  # model with more predictors
# Reduced model
fit_reduced <- BAT12Emo_MImodel_A_Cov  # nested model
# Run D1 test
BAT12Emo_MImodelAD_comparison <- mice::D1(fit_full, fit_reduced)
# View results
print(BAT12Emo_MImodelAD_comparison)
   test statistic df1      df2 dfcom   p.value       riv
 1 ~~ 2 0.7981161   2 219.3385   327 0.4514792 0.2687081
Code
# Full model
fit_full <- BAT12Ment_MImodel_D_CFS  # model with more predictors
# Reduced model
fit_reduced <- BAT12Ment_MImodel_A_Cov  # nested model
# Run D1 test
BAT12Ment_MImodelAD_comparison <- mice::D1(fit_full, fit_reduced)
# View results
print(BAT12Ment_MImodelAD_comparison)
   test statistic df1      df2 dfcom   p.value       riv
 1 ~~ 2  1.025364   2 161.4033   327 0.3609902 0.4468993
Code
# Full model
fit_full <- BAT12Exh_MImodel_D_CFS  # model with more predictors
# Reduced model
fit_reduced <- BAT12Exh_MImodel_A_Cov  # nested model
# Run D1 test
BAT12Exh_MImodelAD_comparison <- mice::D1(fit_full, fit_reduced)
# View results
print(BAT12Exh_MImodelAD_comparison)
   test statistic df1      df2 dfcom   p.value       riv
 1 ~~ 2  2.068783   2 178.3274   327 0.1293611 0.3846013
Code
#A to E
# Full model
fit_full <- BAT12Cog_MImodel_E_all  # model with more predictors
# Reduced model
fit_reduced <- BAT12Cog_MImodel_A_Cov  # nested model
# Run D1 test
BAT12Cog_MImodelAE_comparison <- mice::D1(fit_full, fit_reduced)
# View results
print(BAT12Cog_MImodelAE_comparison)
   test statistic df1      df2 dfcom   p.value       riv
 1 ~~ 2  1.324809  17 273.9653   312 0.1760677 0.5366155
Code
# Full model
fit_full <- BAT12Emo_MImodel_E_all  # model with more predictors
# Reduced model
fit_reduced <- BAT12Emo_MImodel_A_Cov  # nested model
# Run D1 test
BAT12Emo_MImodelAE_comparison <- mice::D1(fit_full, fit_reduced)
# View results
print(BAT12Emo_MImodelAE_comparison)
   test statistic df1      df2 dfcom   p.value       riv
 1 ~~ 2 0.8770736  17 275.4268   312 0.6018115 0.5178395
Code
# Full model
fit_full <- BAT12Ment_MImodel_E_all  # model with more predictors
# Reduced model
fit_reduced <- BAT12Ment_MImodel_A_Cov  # nested model
# Run D1 test
BAT12Ment_MImodelAE_comparison <- mice::D1(fit_full, fit_reduced)
# View results
print(BAT12Emo_MImodelAE_comparison)
   test statistic df1      df2 dfcom   p.value       riv
 1 ~~ 2 0.8770736  17 275.4268   312 0.6018115 0.5178395
Code
# Full model
fit_full <- BAT12Exh_MImodel_E_all  # model with more predictors
# Reduced model
fit_reduced <- BAT12Exh_MImodel_A_Cov  # nested model
# Run D1 test
BAT12Exh_MImodelAE_comparison <- mice::D1(fit_full, fit_reduced)
# View results
print(BAT12Exh_MImodelAE_comparison)
   test statistic df1      df2 dfcom   p.value      riv
 1 ~~ 2  1.431751  17 271.4547   312 0.1209246 0.569357

10 Demographics for reporting

Code
#count unique participants
unique_pids <- length(unique(df$PID))

# Calculate mean, median, SD, and range of Age_2024 per unique participant
age_summary <- df %>%
  group_by(PID) %>%
  summarise(Age_2024 = first(Age_2024)) %>%  # Ensure each participant is counted once
  summarise(
    Mean_Age = mean(Age_2024, na.rm = TRUE),
    Median_Age = median(Age_2024, na.rm = TRUE),
    SD_Age = sd(Age_2024, na.rm = TRUE),
    Min_Age = min(Age_2024, na.rm = TRUE),
    Max_Age = max(Age_2024, na.rm = TRUE),
    Range_Age = Max_Age - Min_Age  # Compute the range
  )

# View the result
print(age_summary)
# A tibble: 1 × 6
  Mean_Age Median_Age SD_Age Min_Age Max_Age Range_Age
     <dbl>      <dbl>  <dbl>   <dbl>   <dbl>     <dbl>
1     27.3         27   5.14      18      36        18
Code
# Count the number of unique men (0) and women (1) in the sample
gender_counts <- df %>%
  group_by(PID) %>%
  summarise(T1_Gender = first(T1_Gender)) %>%  # Get the sex for each unique participant
  summarise(
    Man = sum(T1_Gender == 1, na.rm = TRUE),
    Woman = sum(T1_Gender == 2, na.rm = TRUE),
    Nonbinary = sum(T1_Gender == 3, na.rm = TRUE),
    NotDisclosed = sum(T1_Gender == 4, na.rm = TRUE)
  )

# View the result
print(gender_counts)
# A tibble: 1 × 4
    Man Woman Nonbinary NotDisclosed
  <int> <int>     <int>        <int>
1   118   209         8            2
Code
# Count how many unique PIDs endorsed each ethnicity
# Aggregate endorsements per PID, ensuring each PID is counted once per ethnicity
# df <- df %>%
#   separate_rows(T1_Ethnicity, sep = ",") %>%  # Split values into separate rows
#   mutate(T1_Ethnicity = as.numeric(T1_Ethnicity)) %>%  # Convert to numeric
#   mutate(Indicator = 1) %>%  # Create an indicator for presence
#   pivot_wider(names_from = T1_Ethnicity, values_from = Indicator, values_fill = 0, names_prefix = "T1_Ethnicity_")  # Pivot to wide format
 
# pid_summary <- df %>%
#   group_by(PID) %>%
#   summarise(across(starts_with("T1_Ethnicity_"), ~any(. == 1, na.rm = TRUE))) %>%
#   ungroup()
# 
# ethnicity_counts <- pid_summary %>%
#   summarise(across(starts_with("T1_Ethnicity_"), ~sum(. == TRUE)))
# 
# ethnicity_counts_named <- ethnicity_counts %>%
#   rename(
#     "White" = T1_Ethnicity_1,
#     "Hispanic or Latino" = T1_Ethnicity_2,
#     "Black or African American" = T1_Ethnicity_3,
#     "African" = T1_Ethnicity_4,
#     "Asian" = T1_Ethnicity_5,
#     "South Asian" = T1_Ethnicity_6,
#     "Pacific Islander" = T1_Ethnicity_7,
#     "Middle Eastern" = T1_Ethnicity_9,
#     "Other" = T1_Ethnicity_10
#   )
# 
# print(ethnicity_counts_named)

# write.csv(ethnicity_counts_named, "~/Clin PhD//Research Project/Study. 3 Quantitative Study ER flex/Data/FlexPaper/ethnicity_counts4.csv", row.names = FALSE)

# Define income bracket labels
income_labels <- c(
  "Less than $10,000",
  "$10,000 to $19,999",
  "$20,000 to $29,999",
  "$30,000 to $39,999",
  "$40,000 to $49,999",
  "$50,000 to $59,999",
  "$60,000 to $69,999",
  "$70,000 to $79,999",
  "$80,000 to $89,999",
  "$90,000 to $99,999",
  "$100,000 to $149,999",
  "$150,000 or more"
)

# Ensure unique endorsement per PID by taking the first non-NA income level
income_summary <- df %>%
  group_by(PID) %>%
  summarise(T1_Income = min(T1_Income, na.rm = TRUE)) %>%  # Get the lowest valid income level per PID
  ungroup()

# Remove cases where all values were NA
income_summary <- income_summary %>%
  filter(!is.infinite(T1_Income)) 

# Count occurrences of each income level
income_counts <- income_summary %>%
  count(T1_Income, name = "Count") %>%
  arrange(T1_Income)

# Assign labels
income_counts <- income_counts %>%
  mutate(Income_Bracket = income_labels[T1_Income])

# Print result
print(income_counts)
# A tibble: 12 × 3
   T1_Income Count Income_Bracket      
       <dbl> <int> <chr>               
 1         1    21 Less than $10,000   
 2         2    10 $10,000 to $19,999  
 3         3    15 $20,000 to $29,999  
 4         4    21 $30,000 to $39,999  
 5         5    15 $40,000 to $49,999  
 6         6    15 $50,000 to $59,999  
 7         7    19 $60,000 to $69,999  
 8         8    19 $70,000 to $79,999  
 9         9    23 $80,000 to $89,999  
10        10    27 $90,000 to $99,999  
11        11    88 $100,000 to $149,999
12        12    64 $150,000 or more    
Code
# write.csv(income_counts, "~/Clin PhD/Research Project/Study. 3 Quantitative Study ER flex/Data/FlexPaper/income_counts3.csv", row.names = FALSE)

# Define employment category bracket labels
employment_labels <- c(
  "Executive, administrator, or senior manager (e.g., CEO, sales VP, plant manager)",
  "Professional (e.g., engineer, accountant, systems analyst)",
  "Technical support (e.g., lab technician, legal assistant, computer programmer)",
  "Sales (e.g., sales representative, stockbroker, retail sales)",
  "Clerical and administrative support (e.g., secretary, billing clerk, office supervisor)",
  "Service occupation (e.g., security officer, food service worker, janitor)",
  "Precision production and crafts worker (e.g., mechanic, carpenter, machinist)",
  "Chemical/Production Operator (e.g., shift supervisors and hourly employees)",
  "Labourer (e.g., truck driver, construction worker)",
  "Healthcare professional (e.g., doctor, nurse, psychologist, support worker)",
  "Student"
)

# Ensure unique endorsement per PID by taking the first non-NA employment category
employment_summary <- df %>%
  group_by(PID) %>%
  summarise(T1_Employment_Cat = min(T1_Employment_Cat, na.rm = TRUE)) %>%  # Get the lowest valid employment category per PID
  ungroup()

# Remove cases where all values were NA
employment_summary <- employment_summary %>%
  filter(!is.infinite(T1_Employment_Cat)) 

# Count occurrences of each employment category
employment_counts <- employment_summary %>%
  count(T1_Employment_Cat, name = "Count") %>%
  arrange(T1_Employment_Cat)

# Assign labels
employment_counts <- employment_counts %>%
  mutate(Employment_Category = employment_labels[T1_Employment_Cat])

# Print result
print(employment_counts)
# A tibble: 11 × 3
   T1_Employment_Cat Count Employment_Category                                  
               <dbl> <int> <chr>                                                
 1                 1     4 Executive, administrator, or senior manager (e.g., C…
 2                 2    93 Professional (e.g., engineer, accountant, systems an…
 3                 3    15 Technical support (e.g., lab technician, legal assis…
 4                 4    20 Sales (e.g., sales representative, stockbroker, reta…
 5                 5    38 Clerical and administrative support (e.g., secretary…
 6                 6    19 Service occupation (e.g., security officer, food ser…
 7                 7     1 Precision production and crafts worker (e.g., mechan…
 8                 8     2 Chemical/Production Operator (e.g., shift supervisor…
 9                 9     9 Labourer (e.g., truck driver, construction worker)   
10                10    38 Healthcare professional (e.g., doctor, nurse, psycho…
11                11    98 Student                                              
Code
# write.csv(employment_counts, "~/Clin PhD/Research Project/Study. 3 Quantitative Study ER flex/Data/FlexPaper/employment_counts2.csv", row.names = FALSE)

#Work and Study Summary
df %>%
  count(T1_EmploymentMI)
# A tibble: 3 × 2
  T1_EmploymentMI     n
  <chr>           <int>
1 Study only         49
2 Work & Study       72
3 Work only         216
Code
#how long did surveys take?
mean(df$T1_Durationinseconds, na.rm = TRUE)
[1] 30180.89
Code
sd(df$T1_Durationinseconds, na.rm = TRUE)
[1] 85887.23
Code
median(df$T2_Durationinseconds, na.rm = TRUE)
[1] 6616
Code
df %>%
  count(T2_Progress)
# A tibble: 10 × 2
   T2_Progress     n
         <dbl> <int>
 1           1     1
 2          16     3
 3          17     3
 4          63     1
 5          64     2
 6          65     1
 7          78     1
 8          99    12
 9         100   225
10          NA    88
Code
####Burnout Scores and cut offs####
# Create categorical variables based on cut-offs
df_T1_burnoutscores <- df %>%
  filter(!is.na(T1_BAT12)) %>%  # Keep only T1 data
  mutate(
    # Divide scores first
    T1_BAT12_adj = T1_BAT12 / 12,
    T1_BAT12_Exhaustion_adj = T1_BAT12_Exhaustion / 3,
    T1_BAT12_MentalDistance_adj = T1_BAT12_MentalDistance / 3,
    T1_BAT12_Cognitive_adj = T1_BAT12_Cognitive / 3,
    T1_BAT12_Emotion_adj = T1_BAT12_Emotion / 3,    
    
    # Create categorical variables with distinct ranges
    BAT12_cat = case_when(
      T1_BAT12_adj < 2.54 ~ "Low",
      T1_BAT12_adj >= 2.54 & T1_BAT12_adj < 2.96 ~ "Risk",
      T1_BAT12_adj >= 2.96 ~ "Clinical"
    ),
    BAT12_Exhaustion_cat = case_when(
      T1_BAT12_Exhaustion_adj < 3.06 ~ "Low",
      T1_BAT12_Exhaustion_adj >= 3.06 & T1_BAT12_Exhaustion_adj < 3.31 ~ "Risk",
      T1_BAT12_Exhaustion_adj >= 3.31 ~ "Clinical"
    ),
    BAT12_MentalDistance_cat = case_when(
      T1_BAT12_MentalDistance_adj < 2.10 ~ "Low",
      T1_BAT12_MentalDistance_adj >= 2.10 & T1_BAT12_MentalDistance_adj < 3.30 ~ "Risk",
      T1_BAT12_MentalDistance_adj >= 3.30 ~ "Clinical"
    ),
    BAT12_Cognitive_cat = case_when(
      T1_BAT12_Cognitive_adj < 2.70 ~ "Low",
      T1_BAT12_Cognitive_adj >= 2.70 & T1_BAT12_Cognitive_adj < 3.10 ~ "Risk",
      T1_BAT12_Cognitive_adj >= 3.10 ~ "Clinical"
    ),
    BAT12_Emotion_cat = case_when(
      T1_BAT12_Emotion_adj < 2.30 ~ "Low",
      T1_BAT12_Emotion_adj >= 2.30 & T1_BAT12_Emotion_adj < 2.90 ~ "Risk",
      T1_BAT12_Emotion_adj >= 2.90 ~ "Clinical"
    )
  )

# Create a summary table with counts and percentages
summary_table <- df_T1_burnoutscores %>%
  summarise(
    Overall_Low = sum(BAT12_cat == "Low"),
    Overall_Risk = sum(BAT12_cat == "Risk"),
    Overall_Clinical = sum(BAT12_cat == "Clinical"),
    Exhaustion_Low = sum(BAT12_Exhaustion_cat == "Low"),
    Exhaustion_Risk = sum(BAT12_Exhaustion_cat == "Risk"),
    Exhaustion_Clinical = sum(BAT12_Exhaustion_cat == "Clinical"),
    MentalDistance_Low = sum(BAT12_MentalDistance_cat == "Low"),
    MentalDistance_Risk = sum(BAT12_MentalDistance_cat == "Risk"),
    MentalDistance_Clinical = sum(BAT12_MentalDistance_cat == "Clinical"),
    Cognitive_Low = sum(BAT12_Cognitive_cat == "Low"),
    Cognitive_Risk = sum(BAT12_Cognitive_cat == "Risk"),
    Cognitive_Clinical = sum(BAT12_Cognitive_cat == "Clinical"),
    Emotion_Low = sum(BAT12_Emotion_cat == "Low"),
    Emotion_Risk = sum(BAT12_Emotion_cat == "Risk"),
    Emotion_Clinical = sum(BAT12_Emotion_cat == "Clinical")
  )

# Optional: calculate percentages
summary_table_pct <- df_T1_burnoutscores %>%
  summarise(
    Overall_Low = mean(BAT12_cat == "Low")*100,
    Overall_Risk = mean(BAT12_cat == "Risk")*100,
    Overall_Clinical = mean(BAT12_cat == "Clinical")*100,
    Exhaustion_Low = mean(BAT12_Exhaustion_cat == "Low")*100,
    Exhaustion_Risk = mean(BAT12_Exhaustion_cat == "Risk")*100,
    Exhaustion_Clinical = mean(BAT12_Exhaustion_cat == "Clinical")*100,
    MentalDistance_Low = mean(BAT12_MentalDistance_cat == "Low")*100,
    MentalDistance_Risk = mean(BAT12_MentalDistance_cat == "Risk")*100,
    MentalDistance_Clinical = mean(BAT12_MentalDistance_cat == "Clinical")*100,
    Cognitive_Low = mean(BAT12_Cognitive_cat == "Low")*100,
    Cognitive_Risk = mean(BAT12_Cognitive_cat == "Risk")*100,
    Cognitive_Clinical = mean(BAT12_Cognitive_cat == "Clinical")*100,
    Emotion_Low = mean(BAT12_Emotion_cat == "Low")*100,
    Emotion_Risk = mean(BAT12_Emotion_cat == "Risk")*100,
    Emotion_Clinical = mean(BAT12_Emotion_cat == "Clinical")*100
  )

# 2. Reshape into long format for easy summarising
long_df <- df_T1_burnoutscores %>%
  select(PID, BAT12_cat, BAT12_Exhaustion_cat, BAT12_MentalDistance_cat, BAT12_Cognitive_cat, BAT12_Emotion_cat) %>%
  pivot_longer(
    cols = -PID,
    names_to = "Domain",
    values_to = "Category"
  )

# 3. Calculate counts and percentages
summary_table <- long_df %>%
  group_by(Domain, Category) %>%
  summarise(Count = n(), .groups = "drop") %>%
  group_by(Domain) %>%
  mutate(Percentage = round(Count / sum(Count) * 100, 1)) %>%
  ungroup()

summary_table
# A tibble: 14 × 4
   Domain                   Category Count Percentage
   <chr>                    <chr>    <int>      <dbl>
 1 BAT12_Cognitive_cat      Clinical    87       25.8
 2 BAT12_Cognitive_cat      Low        213       63.2
 3 BAT12_Cognitive_cat      Risk        37       11  
 4 BAT12_Emotion_cat        Clinical    38       11.3
 5 BAT12_Emotion_cat        Low        258       76.6
 6 BAT12_Emotion_cat        Risk        41       12.2
 7 BAT12_Exhaustion_cat     Clinical   123       36.5
 8 BAT12_Exhaustion_cat     Low        214       63.5
 9 BAT12_MentalDistance_cat Clinical    78       23.1
10 BAT12_MentalDistance_cat Low        143       42.4
11 BAT12_MentalDistance_cat Risk       116       34.4
12 BAT12_cat                Clinical    81       24  
13 BAT12_cat                Low        189       56.1
14 BAT12_cat                Risk        67       19.9

11 Correlation

Code
# Variables of interest
vars <- c(
  "T1_BAT12_Cognitive", "T1_BAT12_Emotion", "T1_BAT12_MentalDistance", "T1_BAT12_Exhaustion",
  "T1_PSS4", "Age_2024", 
  "T1_COPE_SelfDistraction", "T1_COPE_ActiveCoping", "T1_COPE_Denial", "T1_COPE_SubstanceUse",
  "T1_COPE_UseOfEmotionalSupport", "T1_COPE_BehavioralDisengagement", "T1_COPE_Religion", 
  "T1_COPE_Venting", "T1_COPE_UseOfInstrumentalSupport", "T1_COPE_PositiveReframing",
  "T1_COPE_SelfBlame", "T1_COPE_Planning", "T1_COPE_Humor", "T1_COPE_Acceptance",
  "T1_CFS_Adaptive", "T1_CFS_Evaluation_new", "CST_switchcost.1"
)

# Subset data
df_subset <- df_CC[, vars]

# Spearman correlation
cor_results <- psych::corr.test(df_subset, method = "spearman", use = "pairwise")

# Extract matrices
r_mat <- cor_results$r
p_mat <- cor_results$p

# Function to add stars
add_stars <- function(r, p) {
  stars <- ifelse(p < .001, "***",
                  ifelse(p < .01, "**",
                         ifelse(p < .05, "*", "")))
  paste0(format(round(r, 2), nsmall = 2), stars)
}

# Apply stars
r_with_stars <- matrix(nrow = nrow(r_mat), ncol = ncol(r_mat))
for (i in 1:nrow(r_mat)) {
  for (j in 1:ncol(r_mat)) {
    r_with_stars[i, j] <- add_stars(r_mat[i, j], p_mat[i, j])
  }
}

# Make it a nicely labeled data frame
rownames(r_with_stars) <- colnames(r_with_stars) <- colnames(r_mat)
r_with_stars_df <- as.data.frame(r_with_stars)

# Optional: remove upper triangle for cleaner table
r_with_stars_df[upper.tri(r_with_stars_df, diag = TRUE)] <- ""

# Print as publication-style table
knitr::kable(r_with_stars_df, format = "markdown", caption = "Spearman Correlation Matrix with Significance Stars")
Spearman Correlation Matrix with Significance Stars
T1_BAT12_Cognitive T1_BAT12_Emotion T1_BAT12_MentalDistance T1_BAT12_Exhaustion T1_PSS4 Age_2024 T1_COPE_SelfDistraction T1_COPE_ActiveCoping T1_COPE_Denial T1_COPE_SubstanceUse T1_COPE_UseOfEmotionalSupport T1_COPE_BehavioralDisengagement T1_COPE_Religion T1_COPE_Venting T1_COPE_UseOfInstrumentalSupport T1_COPE_PositiveReframing T1_COPE_SelfBlame T1_COPE_Planning T1_COPE_Humor T1_COPE_Acceptance T1_CFS_Adaptive T1_CFS_Evaluation_new CST_switchcost.1
T1_BAT12_Cognitive
T1_BAT12_Emotion 0.36***
T1_BAT12_MentalDistance 0.55*** 0.43***
T1_BAT12_Exhaustion 0.57*** 0.39*** 0.69***
T1_PSS4 0.42*** 0.40*** 0.54*** 0.48***
Age_2024 -0.05 0.13* 0.07 -0.05 -0.03
T1_COPE_SelfDistraction 0.26*** 0.09 0.15* 0.18** 0.13* -0.07
T1_COPE_ActiveCoping 0.08 0.08 0.07 0.11 -0.08 -0.02 0.35***
T1_COPE_Denial 0.13 0.28*** 0.15* 0.11 0.22*** 0.00 0.15* 0.18**
T1_COPE_SubstanceUse 0.16* 0.22*** 0.13* 0.10 0.21** 0.12 0.13* -0.04 0.25***
T1_COPE_UseOfEmotionalSupport -0.03 0.10 0.04 0.02 -0.15* -0.04 0.31*** 0.39*** 0.14* 0.07
T1_COPE_BehavioralDisengagement 0.23*** 0.17** 0.23*** 0.22*** 0.31*** -0.07 0.21*** 0.00 0.31*** 0.20** 0.01
T1_COPE_Religion 0.00 0.15* 0.02 0.02 0.05 -0.01 0.18** 0.28*** 0.27*** 0.12 0.19** 0.12
T1_COPE_Venting 0.13* 0.24*** 0.17** 0.17* 0.10 -0.08 0.37*** 0.41*** 0.27*** 0.17* 0.46*** 0.19** 0.24***
T1_COPE_UseOfInstrumentalSupport -0.01 0.05 0.02 0.02 -0.08 -0.08 0.34*** 0.43*** 0.17** 0.03 0.78*** 0.05 0.23*** 0.50***
T1_COPE_PositiveReframing -0.07 0.11 -0.08 -0.01 -0.13 0.02 0.25*** 0.44*** 0.13* 0.02 0.43*** -0.06 0.31*** 0.35*** 0.41***
T1_COPE_SelfBlame 0.18** 0.18** 0.19** 0.16* 0.29*** -0.04 0.42*** 0.29*** 0.27*** 0.14* 0.28*** 0.28*** 0.09 0.39*** 0.31*** 0.15*
T1_COPE_Planning 0.05 0.14* 0.08 0.08 -0.01 0.06 0.39*** 0.65*** 0.16* -0.02 0.44*** 0.04 0.24*** 0.41*** 0.47*** 0.55*** 0.38***
T1_COPE_Humor 0.17** 0.03 0.19** 0.10 0.14* -0.04 0.22*** 0.11 0.19** 0.10 0.18** 0.18** 0.05 0.28*** 0.26*** 0.17** 0.27*** 0.16*
T1_COPE_Acceptance 0.04 0.04 0.09 0.10 -0.03 0.05 0.35*** 0.44*** -0.03 -0.01 0.37*** -0.02 0.13* 0.37*** 0.42*** 0.35*** 0.21** 0.49*** 0.24***
T1_CFS_Adaptive -0.10 -0.02 -0.07 -0.02 -0.23*** -0.05 0.15* 0.45*** 0.00 -0.09 0.28*** -0.16* 0.07 0.26*** 0.31*** 0.30*** 0.03 0.37*** 0.11 0.36***
T1_CFS_Evaluation_new -0.12 0.02 -0.09 -0.08 -0.17** -0.07 0.09 0.37*** 0.04 -0.10 0.28*** -0.11 0.14* 0.23*** 0.25*** 0.37*** 0.09 0.29*** 0.04 0.28*** 0.61***
CST_switchcost.1 0.09 0.04 0.11 0.10 0.04 0.00 0.09 0.19** 0.09 0.00 0.10 0.03 0.05 0.11 0.09 0.04 0.11 0.11 0.08 0.10 0.08 0.10
Code
write.csv(r_with_stars_df, "correlation_table.csv")

# Assuming cor_matrix is your correlation matrix
# Remove "T1_" from row and column names
colnames(r_with_stars_df) <- gsub("^T1_", "", colnames(r_with_stars_df))
rownames(r_with_stars_df) <- gsub("^T1_", "", rownames(r_with_stars_df))

12 Initial Steps - Commented out

12.1 Data Preparation

The following sections outline data processing steps, including error correction and variable recoding. These checks were performed on the original dataset, updated accordingly through this code, and saved as a cleaned dataset.

Code
#Addressing fake participants
# Count how many 'fake' people are in the dataset (Include == 0 or -1)
# count_fake <- df %>% filter(Include %in% c(0, -1)) %>% nrow()
# print(count_fake)
# 
# # Remove dodgy people (Include != 0 and != -1)
# df <- df %>% filter(!Include %in% c(0, -1))

# Check that removal worked
count_fake_check <- df %>% filter(Include %in% c(0, -1)) %>% nrow()
print(count_fake_check)
[1] 0
Code
# 
# #Adjust Age variable 
# table(df$T1_DOB) #there is one participant (63e57265347f612359b7c4ec) with DOB 19888
# df$T1_DOB[df$PID == "63e57265347f612359b7c4ec"] <- 1988 #changing the DOB to 1988
# table(df$T1_DOB) #there are 2 participants with DOB as 1961 and 1980
# df$T1_DOB <- as.numeric(df$T1_DOB)
# 
# df$Age_2024 <- 2024 - df$T1_DOB
# table(df$Age_2024)
# #exclude over 36yo
# 
# df <- df %>%
#   filter(Age_2024 <= 36)

table(df$Age_2024)

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 
 4 18 13 22 21 18 19 21 15 18 25 13 22 22 13 18 23 24  8 
Code
# #Change the gender variable
# #OG scoring man = 1, woman = 2, non-binary = 3, prefer not to say = 4.
# #Take all 3s and 4s and make them 2s
# table(df$T1_Gender)
# table(df$T1_Sex)
# 
# df <- df %>%
#   mutate(T1_Gender_MW = ifelse(T1_Gender %in% c(3, 4), 2, T1_Gender))
# 
# summary(df$T1_Gender == 3)
# summary(df$T1_Gender == 4)
# summary(df$T1_Gender_MW == 3)
# summary(df$T1_Gender_MW == 4)
#there were 2x Gender = 4, there were 10x Gender = 3

table(df$T1_Gender)

  1   2   3   4 
118 209   8   2 
Code
table(df$T1_Sex)

  1   2 
118 219 
Code
table(df$T1_Gender_MW)

  Man Woman 
  118   219 
Code
#after mutate, 132x Gender = 1, there were 245x Gender = 3


# #Exclude non employed people#
# df %>%
#   filter(T1_Employment_recoded == 4) %>%
#   summarise(n = n())
# 
# #view the PIDs
# simple.table <- df[df$T1_Employment_recoded == 4, c("PID", "T1_Employment_recoded")]
# 
# #exclude
# df <- df %>%
#   filter(T1_Employment_recoded != 4)
# 
# ###Exclude based on CST not better than chance
# simple.table <- df[c('PID', 'CST_correct.1', "T1_CFS_1")]
# 
# #exclude rows where CST_correct.1 < 50 and not NA
# sum(df$CST_correct.1 <= 50, na.rm = TRUE)
# sum(is.na(df$CST_correct.1))
# 
# #Keep all participants who either didn’t complete the CST (missing), or who %correct was at least 50
# df <- df %>% 
#   filter(is.na(CST_correct.1) | CST_correct.1 >= 50)

12.2 Scoring

The following section checks variable scoring and recodes where appropriate. These checks were applied to the original dataset, updated via this code, and saved as a cleaned dataset.

Code
# #CFS
# df <- read_excel("~/Clin PhD/Research Project/Study. 3 Quantitative Study ER flex/Data/Dataset_clean_020725.xlsx")
# 
# #reverse score items 2 and 7
# df$T1_CFS_2_R <- 3 - df$T1_CFS_2
# df$T1_CFS_7_R <- 3 - df$T1_CFS_7
# df$T2_CFS_2_R <- 3 - df$T2_CFS_2
# df$T2_CFS_7_R <- 3 - df$T2_CFS_7
# df$T3_CFS_2_R <- 3 - df$T3_CFS_2
# df$T3_CFS_7_R <- 3 - df$T3_CFS_7
# 
# #check that it worked
# simple.table <- df[c("PID", "T1_CFS_2", "T1_CFS_7", "T2_CFS_2", "T2_CFS_7", 
#                      "T3_CFS_2", "T3_CFS_7", "T1_CFS_2_R", "T1_CFS_7_R", 
#                      "T2_CFS_2_R", "T2_CFS_7_R", "T3_CFS_2_R", "T3_CFS_7_R")]
# 
# #Checking scoring.
# # Subset columns using column names
# subset_data_CFS <- df[, c("PID", "T1_CFS_1", "T1_CFS_2_R", "T1_CFS_3", "T1_CFS_4", "T1_CFS_5",
#                           "T1_CFS_6", "T1_CFS_7_R", "T1_CFS_8", "T1_CFS_9", "T1_CFS_10",
#                           "T2_CFS_1", "T2_CFS_2_R", "T2_CFS_3", "T2_CFS_4", "T2_CFS_5",
#                           "T2_CFS_6", "T2_CFS_7_R", "T2_CFS_8", "T2_CFS_9", "T2_CFS_10",
#                           "T3_CFS_1", "T3_CFS_2_R", "T3_CFS_3", "T3_CFS_4", "T3_CFS_5",
#                           "T3_CFS_6", "T3_CFS_7_R", "T3_CFS_8", "T3_CFS_9", "T3_CFS_10",
#                           "T1_CFS_Adaptive", "T1_CFS_Evaluation", "T2_CFS_Adaptive", 
#                           "T2_CFS_Evaluation", "T3_CFS_Adaptive", "T3_CFS_Evaluation")]
# 
# #Adaptive is fine - see commented out code which showed consistency
# # For T1 CFS Adaptive Check
# # df$T1_CFS_Adaptive_check <- apply(
# #   df[, c("T1_CFS_1", "T1_CFS_3", "T1_CFS_4", "T1_CFS_5", "T1_CFS_10")],
# #   1,
# #   function(x) {
# #     if (any(is.na(x))) {
# #       return(NA)  # Return NA if any value is missing
# #     } else {
# #       return(sum(x))  # Otherwise, return the sum
# #     }
# #   }
# # )
# # 
# # #check that it worked
# # simple_table <- df[c("PID", "T1_CFS_Adaptive_check", "T1_CFS_Adaptive", "T1_CFS_1", "T1_CFS_3", "T1_CFS_4", "T1_CFS_5", "T1_CFS_10")]
# # # Print the table
# # print(simple_table)
# # #We can see that the scoring for Adaptive is fine
# 
# # For T1 CFS Evaluation Check
# df$T1_CFS_Evaluation_check <- apply(
#   df[, c("T1_CFS_2_R", "T1_CFS_6", "T1_CFS_7_R", "T1_CFS_8", "T1_CFS_9")],
#   1,
#   function(x) {
#     if (any(is.na(x))) {
#       return(NA)  # Return NA if any value is missing
#     } else {
#       return(sum(x))  # Otherwise, return the sum
#     }
#   }
# )
# 
# simple_table <- df[c("PID", "T1_CFS_Evaluation_check", "T1_CFS_Evaluation", "T1_CFS_2_R", "T1_CFS_6", "T1_CFS_7_R", "T1_CFS_8", "T1_CFS_9")]
# #We can see that the scoring for Evaluation is wrong, so will need to be redone.
# 
# #Recalculate the CFS Evaluation Scoring 
# # Function to calculate CFS Evaluation
# calculate_CFS_Evaluation <- function(data, timepoint) {
#   # Define all relevant column names explicitly for Evaluation
#   all_cols <- c(
#     paste0(timepoint, "_CFS_2_R"),
#     paste0(timepoint, "_CFS_6"),
#     paste0(timepoint, "_CFS_7_R"),
#     paste0(timepoint, "_CFS_8"),
#     paste0(timepoint, "_CFS_9")
#   )
#   
#   missing_col <- paste0(timepoint, "_CFS_2_R")  # Column to check for missingness
#   
#   # Compute sum normally when CFS_2_R is present
#   row_sums_all <- rowSums(data[, all_cols], na.rm = TRUE)
#   
#   # Identify rows where all values are missing (to prevent them from becoming 0)
#   all_na_rows <- rowSums(!is.na(data[, all_cols])) == 0  # TRUE if all values are NA
#   
#   # Compute sum when CFS_2_R is missing (adjusting for scale)
#   cols_without_CFS_2_R <- setdiff(all_cols, missing_col)
#   row_sums_adjusted <- rowSums(data[, cols_without_CFS_2_R], na.rm = TRUE) / 4 * 5
#   
#   # Assign sums while keeping NA rows as NA
#   data[[paste0(timepoint, "_CFS_Evaluation")]] <- row_sums_all
#   
#   # Fix: Assign `row_sums_adjusted` only to the specific subset
#   missing_rows <- is.na(data[[missing_col]])  # Logical vector
#   data[missing_rows, paste0(timepoint, "_CFS_Evaluation")] <- row_sums_adjusted[missing_rows]
#   
#   data[all_na_rows, paste0(timepoint, "_CFS_Evaluation")] <- NA  # Ensure rows with all NAs remain NA
#   
#   return(data)
# }
# 
# # Apply the functions to each timepoint
# df <- calculate_CFS_Evaluation(df, "T1")
# df <- calculate_CFS_Evaluation(df, "T2")
# df <- calculate_CFS_Evaluation(df, "T3")
# 
# #check that it worked
# simple_table <- df[c("PID", "T1_CFS_Evaluation_check", "T1_CFS_Evaluation", "T1_CFS_2_R", "T1_CFS_6", "T1_CFS_7_R", "T1_CFS_8", "T1_CFS_9")]
# # Print the table
# print(simple_table)
# 
# #remove 'check' names
# df <- df[, !(names(df) %in% c("T1_CFS_Adaptive_check", "T2_CFS_Adaptive_check", "T3_CFS_Adaptive_check",
#                               "T1_CFS_Evaluation_check", "T2_CFS_Evaluation_check", "T3_CFS_Evaluation_check"))]
# 
# #Calculate a new Evaluation score without the reverse scoring for t1 and t2
# df$T1_CFS_Evaluation_new <- apply(
#   df[, c("T1_CFS_6", "T1_CFS_8", "T1_CFS_9")],
#   1,
#   function(x) {
#     if (any(is.na(x))) {
#       return(NA)  # Return NA if any value is missing
#     } else {
#       return(sum(x))  # Otherwise, return the sum
#     }
#   }
# )
# 
# df$T1_CFS_Evaluation_newtotal <- ((df$T1_CFS_Evaluation_new /3) *5)
# 
# simple_table <- df[c("PID", "T1_CFS_Evaluation_new", "T1_CFS_Evaluation_newtotal", "T1_CFS_Evaluation", "T1_CFS_2_R", "T1_CFS_6", "T1_CFS_7_R", "T1_CFS_8", "T1_CFS_9")]
# 
# df$T2_CFS_Evaluation_new <- apply(
#   df[, c("T2_CFS_6", "T2_CFS_8", "T2_CFS_9")],
#   1,
#   function(x) {
#     if (any(is.na(x))) {
#       return(NA)  # Return NA if any value is missing
#     } else {
#       return(sum(x))  # Otherwise, return the sum
#     }
#   }
# )
# 
# df$T2_CFS_Evaluation_newtotal <- ((df$T2_CFS_Evaluation_new /3) *5)
# 
# simple_table <- df[c("PID", "T2_CFS_Evaluation_new", "T2_CFS_Evaluation_newtotal", "T2_CFS_Evaluation", "T2_CFS_2_R", "T2_CFS_6", "T2_CFS_7_R", "T2_CFS_8", "T2_CFS_9")]
# 
# 
# #Calculate overall Scores 
# # df <- df %>%
# #   mutate(
# #     T1_CFS_Total = T1_CFS_Evaluation + T1_CFS_Adaptive,
# #     T2_CFS_Total = T2_CFS_Evaluation + T2_CFS_Adaptive,
# #     T3_CFS_Total = T3_CFS_Evaluation + T3_CFS_Adaptive
# #   )
# # 
# # simple_table <- df[c("PID", "T1_CFS_Total", "T1_CFS_Adaptive", "T1_CFS_Evaluation", "T1_CFS_2_R", "T1_CFS_6", "T1_CFS_7_R", "T1_CFS_8", "T1_CFS_9")]
# 
# #COPE#
# 
# # Select the columns related to COPE strategies
# T1_COPE_items <- df[, c("T1_COPE_1", "T1_COPE_2", "T1_COPE_3", "T1_COPE_4", "T1_COPE_5", "T1_COPE_6", "T1_COPE_7"
#                         , "T1_COPE_8", "T1_COPE_9", "T1_COPE_10", "T1_COPE_11", "T1_COPE_12", "T1_COPE_13", "T1_COPE_14", 
#                         "T1_COPE_15", "T1_COPE_16", "T1_COPE_17", "T1_COPE_18", "T1_COPE_19", "T1_COPE_20", "T1_COPE_21", 
#                         "T1_COPE_22", "T1_COPE_23", "T1_COPE_24", "T1_COPE_25", "T1_COPE_26", "T1_COPE_27", "T1_COPE_28" )]
# 
# df <- df %>%
#   mutate(
#     T1_COPE_SelfDistraction = if_else(is.na(T1_COPE_1) | is.na(T1_COPE_19), NA_real_, T1_COPE_1 + T1_COPE_19),
#     T1_COPE_ActiveCoping = if_else(is.na(T1_COPE_2) | is.na(T1_COPE_7), NA_real_, T1_COPE_2 + T1_COPE_7),
#     T1_COPE_Denial = if_else(is.na(T1_COPE_3) | is.na(T1_COPE_8), NA_real_, T1_COPE_3 + T1_COPE_8),
#     T1_COPE_SubstanceUse = if_else(is.na(T1_COPE_4) | is.na(T1_COPE_11), NA_real_, T1_COPE_4 + T1_COPE_11),
#     T1_COPE_UseOfEmotionalSupport = if_else(is.na(T1_COPE_5) | is.na(T1_COPE_15), NA_real_, T1_COPE_5 + T1_COPE_15),
#     T1_COPE_BehavioralDisengagement = if_else(is.na(T1_COPE_6) | is.na(T1_COPE_16), NA_real_, T1_COPE_6 + T1_COPE_16),
#     T1_COPE_Religion = if_else(is.na(T1_COPE_22) | is.na(T1_COPE_27), NA_real_, T1_COPE_22 + T1_COPE_27),
#     T1_COPE_Venting = if_else(is.na(T1_COPE_9) | is.na(T1_COPE_21), NA_real_, T1_COPE_9 + T1_COPE_21),
#     T1_COPE_UseOfInstrumentalSupport = if_else(is.na(T1_COPE_10) | is.na(T1_COPE_23), NA_real_, T1_COPE_10 + T1_COPE_23),
#     T1_COPE_PositiveReframing = if_else(is.na(T1_COPE_12) | is.na(T1_COPE_17), NA_real_, T1_COPE_12 + T1_COPE_17),
#     T1_COPE_SelfBlame = if_else(is.na(T1_COPE_13) | is.na(T1_COPE_26), NA_real_, T1_COPE_13 + T1_COPE_26),
#     T1_COPE_Planning = if_else(is.na(T1_COPE_14) | is.na(T1_COPE_25), NA_real_, T1_COPE_14 + T1_COPE_25),
#     T1_COPE_Humor = if_else(is.na(T1_COPE_18) | is.na(T1_COPE_28), NA_real_, T1_COPE_18 + T1_COPE_28),
#     T1_COPE_Acceptance = if_else(is.na(T1_COPE_20) | is.na(T1_COPE_24), NA_real_, T1_COPE_20 + T1_COPE_24)
#   )
# 
# df <- df %>%
#   mutate(
#     T1_COPE_2wk_SelfDistraction = if_else(is.na(T1_COPE_2wk_1) | is.na(T1_COPE_2wk_19), NA_real_, T1_COPE_2wk_1 + T1_COPE_2wk_19),
#     T1_COPE_2wk_ActiveCoping = if_else(is.na(T1_COPE_2wk_2) | is.na(T1_COPE_2wk_7), NA_real_, T1_COPE_2wk_2 + T1_COPE_2wk_7),
#     T1_COPE_2wk_Denial = if_else(is.na(T1_COPE_2wk_3) | is.na(T1_COPE_2wk_8), NA_real_, T1_COPE_2wk_3 + T1_COPE_2wk_8),
#     T1_COPE_2wk_SubstanceUse = if_else(is.na(T1_COPE_2wk_4) | is.na(T1_COPE_2wk_11), NA_real_, T1_COPE_2wk_4 + T1_COPE_2wk_11),
#     T1_COPE_2wk_UseOfEmotionalSupport = if_else(is.na(T1_COPE_2wk_5) | is.na(T1_COPE_2wk_15), NA_real_, T1_COPE_2wk_5 + T1_COPE_2wk_15),
#     T1_COPE_2wk_BehavioralDisengagement = if_else(is.na(T1_COPE_2wk_6) | is.na(T1_COPE_2wk_16), NA_real_, T1_COPE_2wk_6 + T1_COPE_2wk_16),
#     T1_COPE_2wk_Religion = if_else(is.na(T1_COPE_2wk_22) | is.na(T1_COPE_2wk_27), NA_real_, T1_COPE_2wk_22 + T1_COPE_2wk_27),
#     T1_COPE_2wk_Venting = if_else(is.na(T1_COPE_2wk_9) | is.na(T1_COPE_2wk_21), NA_real_, T1_COPE_2wk_9 + T1_COPE_2wk_21),
#     T1_COPE_2wk_UseOfInstrumentalSupport = if_else(is.na(T1_COPE_2wk_10) | is.na(T1_COPE_2wk_23), NA_real_, T1_COPE_2wk_10 + T1_COPE_2wk_23),
#     T1_COPE_2wk_PositiveReframing = if_else(is.na(T1_COPE_2wk_12) | is.na(T1_COPE_2wk_17), NA_real_, T1_COPE_2wk_12 + T1_COPE_2wk_17),
#     T1_COPE_2wk_SelfBlame = if_else(is.na(T1_COPE_2wk_13) | is.na(T1_COPE_2wk_26), NA_real_, T1_COPE_2wk_13 + T1_COPE_2wk_26),
#     T1_COPE_2wk_Planning = if_else(is.na(T1_COPE_2wk_14) | is.na(T1_COPE_2wk_25), NA_real_, T1_COPE_2wk_14 + T1_COPE_2wk_25),
#     T1_COPE_2wk_Humor = if_else(is.na(T1_COPE_2wk_18) | is.na(T1_COPE_2wk_28), NA_real_, T1_COPE_2wk_18 + T1_COPE_2wk_28),
#     T1_COPE_2wk_Acceptance = if_else(is.na(T1_COPE_2wk_20) | is.na(T1_COPE_2wk_24), NA_real_, T1_COPE_2wk_20 + T1_COPE_2wk_24)
#   )
# 
# df <- df %>%
#   mutate(
#     T2_COPE_2wk_SelfDistraction = if_else(is.na(T2_COPE_2wk_1) | is.na(T2_COPE_2wk_19), NA_real_, T2_COPE_2wk_1 + T2_COPE_2wk_19),
#     T2_COPE_2wk_ActiveCoping = if_else(is.na(T2_COPE_2wk_2) | is.na(T2_COPE_2wk_7), NA_real_, T2_COPE_2wk_2 + T2_COPE_2wk_7),
#     T2_COPE_2wk_Denial = if_else(is.na(T2_COPE_2wk_3) | is.na(T2_COPE_2wk_8), NA_real_, T2_COPE_2wk_3 + T2_COPE_2wk_8),
#     T2_COPE_2wk_SubstanceUse = if_else(is.na(T2_COPE_2wk_4) | is.na(T2_COPE_2wk_11), NA_real_, T2_COPE_2wk_4 + T2_COPE_2wk_11),
#     T2_COPE_2wk_UseOfEmotionalSupport = if_else(is.na(T2_COPE_2wk_5) | is.na(T2_COPE_2wk_15), NA_real_, T2_COPE_2wk_5 + T2_COPE_2wk_15),
#     T2_COPE_2wk_BehavioralDisengagement = if_else(is.na(T2_COPE_2wk_6) | is.na(T2_COPE_2wk_16), NA_real_, T2_COPE_2wk_6 + T2_COPE_2wk_16),
#     T2_COPE_2wk_Religion = if_else(is.na(T2_COPE_2wk_22) | is.na(T2_COPE_2wk_27), NA_real_, T2_COPE_2wk_22 + T2_COPE_2wk_27),
#     T2_COPE_2wk_Venting = if_else(is.na(T2_COPE_2wk_9) | is.na(T2_COPE_2wk_21), NA_real_, T2_COPE_2wk_9 + T2_COPE_2wk_21),
#     T2_COPE_2wk_UseOfInstrumentalSupport = if_else(is.na(T2_COPE_2wk_10) | is.na(T2_COPE_2wk_23), NA_real_, T2_COPE_2wk_10 + T2_COPE_2wk_23),
#     T2_COPE_2wk_PositiveReframing = if_else(is.na(T2_COPE_2wk_12) | is.na(T2_COPE_2wk_17), NA_real_, T2_COPE_2wk_12 + T2_COPE_2wk_17),
#     T2_COPE_2wk_SelfBlame = if_else(is.na(T2_COPE_2wk_13) | is.na(T2_COPE_2wk_26), NA_real_, T2_COPE_2wk_13 + T2_COPE_2wk_26),
#     T2_COPE_2wk_Planning = if_else(is.na(T2_COPE_2wk_14) | is.na(T2_COPE_2wk_25), NA_real_, T2_COPE_2wk_14 + T2_COPE_2wk_25),
#     T2_COPE_2wk_Humor = if_else(is.na(T2_COPE_2wk_18) | is.na(T2_COPE_2wk_28), NA_real_, T2_COPE_2wk_18 + T2_COPE_2wk_28),
#     T2_COPE_2wk_Acceptance = if_else(is.na(T2_COPE_2wk_20) | is.na(T2_COPE_2wk_24), NA_real_, T2_COPE_2wk_20 + T2_COPE_2wk_24)
#   )
# 
# df <- df %>%
#   mutate(
#     T3_COPE_2wk_SelfDistraction = if_else(is.na(T3_COPE_2wk_1) | is.na(T3_COPE_2wk_19), NA_real_, T3_COPE_2wk_1 + T3_COPE_2wk_19),
#     T3_COPE_2wk_ActiveCoping = if_else(is.na(T3_COPE_2wk_2) | is.na(T3_COPE_2wk_7), NA_real_, T3_COPE_2wk_2 + T3_COPE_2wk_7),
#     T3_COPE_2wk_Denial = if_else(is.na(T3_COPE_2wk_3) | is.na(T3_COPE_2wk_8), NA_real_, T3_COPE_2wk_3 + T3_COPE_2wk_8),
#     T3_COPE_2wk_SubstanceUse = if_else(is.na(T3_COPE_2wk_4) | is.na(T3_COPE_2wk_11), NA_real_, T3_COPE_2wk_4 + T3_COPE_2wk_11),
#     T3_COPE_2wk_UseOfEmotionalSupport = if_else(is.na(T3_COPE_2wk_5) | is.na(T3_COPE_2wk_15), NA_real_, T3_COPE_2wk_5 + T3_COPE_2wk_15),
#     T3_COPE_2wk_BehavioralDisengagement = if_else(is.na(T3_COPE_2wk_6) | is.na(T3_COPE_2wk_16), NA_real_, T3_COPE_2wk_6 + T3_COPE_2wk_16),
#     T3_COPE_2wk_Religion = if_else(is.na(T3_COPE_2wk_22) | is.na(T3_COPE_2wk_27), NA_real_, T3_COPE_2wk_22 + T3_COPE_2wk_27),
#     T3_COPE_2wk_Venting = if_else(is.na(T3_COPE_2wk_9) | is.na(T3_COPE_2wk_21), NA_real_, T3_COPE_2wk_9 + T3_COPE_2wk_21),
#     T3_COPE_2wk_UseOfInstrumentalSupport = if_else(is.na(T3_COPE_2wk_10) | is.na(T3_COPE_2wk_23), NA_real_, T3_COPE_2wk_10 + T3_COPE_2wk_23),
#     T3_COPE_2wk_PositiveReframing = if_else(is.na(T3_COPE_2wk_12) | is.na(T3_COPE_2wk_17), NA_real_, T3_COPE_2wk_12 + T3_COPE_2wk_17),
#     T3_COPE_2wk_SelfBlame = if_else(is.na(T3_COPE_2wk_13) | is.na(T3_COPE_2wk_26), NA_real_, T3_COPE_2wk_13 + T3_COPE_2wk_26),
#     T3_COPE_2wk_Planning = if_else(is.na(T3_COPE_2wk_14) | is.na(T3_COPE_2wk_25), NA_real_, T3_COPE_2wk_14 + T3_COPE_2wk_25),
#     T3_COPE_2wk_Humor = if_else(is.na(T3_COPE_2wk_18) | is.na(T3_COPE_2wk_28), NA_real_, T3_COPE_2wk_18 + T3_COPE_2wk_28),
#     T3_COPE_2wk_Acceptance = if_else(is.na(T3_COPE_2wk_20) | is.na(T3_COPE_2wk_24), NA_real_, T3_COPE_2wk_20 + T3_COPE_2wk_24)
#   )
# 
# T1_COPE_PFC_items <- df[, c("T1_COPE_2", "T1_COPE_7", "T1_COPE_10", "T1_COPE_12", "T1_COPE_14", "T1_COPE_17", "T1_COPE_23", "T1_COPE_25")]
# T1_COPE_EFC_items <- df[, c("T1_COPE_5", "T1_COPE_9", "T1_COPE_13", "T1_COPE_15", "T1_COPE_18", "T1_COPE_20", "T1_COPE_21", "T1_COPE_22", "T1_COPE_24", "T1_COPE_26", "T1_COPE_27", "T1_COPE_28")]
# T1_COPE_AVO_items <- df[, c("T1_COPE_1", "T1_COPE_3", "T1_COPE_4", "T1_COPE_6", "T1_COPE_8", "T1_COPE_11", "T1_COPE_16", "T1_COPE_19")]
# 
# T1_COPE_2wk_PFC_items <- df[, c("T1_COPE_2wk_2", "T1_COPE_2wk_7", "T1_COPE_2wk_10", "T1_COPE_2wk_12", "T1_COPE_2wk_14", "T1_COPE_2wk_17", "T1_COPE_2wk_23", "T1_COPE_2wk_25")]
# T1_COPE_2wk_EFC_items <- df[, c("T1_COPE_2wk_5", "T1_COPE_2wk_9", "T1_COPE_2wk_13", "T1_COPE_2wk_15", "T1_COPE_2wk_18", "T1_COPE_2wk_20", "T1_COPE_2wk_21", "T1_COPE_2wk_22", "T1_COPE_2wk_24", "T1_COPE_2wk_26", "T1_COPE_2wk_27", "T1_COPE_2wk_28")]
# T1_COPE_2wk_AVO_items <- df[, c("T1_COPE_2wk_1", "T1_COPE_2wk_3", "T1_COPE_2wk_4", "T1_COPE_2wk_6", "T1_COPE_2wk_8", "T1_COPE_2wk_11", "T1_COPE_2wk_16", "T1_COPE_2wk_19")]
# 
# T2_COPE_2wk_PFC_items <- df[, c("T2_COPE_2wk_2", "T2_COPE_2wk_7", "T2_COPE_2wk_10", "T2_COPE_2wk_12", "T2_COPE_2wk_14", "T2_COPE_2wk_17", "T2_COPE_2wk_23", "T2_COPE_2wk_25")]
# T2_COPE_2wk_EFC_items <- df[, c("T2_COPE_2wk_5", "T2_COPE_2wk_9", "T2_COPE_2wk_13", "T2_COPE_2wk_15", "T2_COPE_2wk_18", "T2_COPE_2wk_20", "T2_COPE_2wk_21", "T2_COPE_2wk_22", "T2_COPE_2wk_24", "T2_COPE_2wk_26", "T2_COPE_2wk_27", "T2_COPE_2wk_28")]
# T2_COPE_2wk_AVO_items <- df[, c("T2_COPE_2wk_1", "T2_COPE_2wk_3", "T2_COPE_2wk_4", "T2_COPE_2wk_6", "T2_COPE_2wk_8", "T2_COPE_2wk_11", "T2_COPE_2wk_16", "T2_COPE_2wk_19")]
# 
# T3_COPE_2wk_PFC_items <- df[, c("T3_COPE_2wk_2", "T3_COPE_2wk_7", "T3_COPE_2wk_10", "T3_COPE_2wk_12", "T3_COPE_2wk_14", "T3_COPE_2wk_17", "T3_COPE_2wk_23", "T3_COPE_2wk_25")]
# T3_COPE_2wk_EFC_items <- df[, c("T3_COPE_2wk_5", "T3_COPE_2wk_9", "T3_COPE_2wk_13", "T3_COPE_2wk_15", "T3_COPE_2wk_18", "T3_COPE_2wk_20", "T3_COPE_2wk_21", "T3_COPE_2wk_22", "T3_COPE_2wk_24", "T3_COPE_2wk_26", "T3_COPE_2wk_27", "T3_COPE_2wk_28")]
# T3_COPE_2wk_AVO_items <- df[, c("T3_COPE_2wk_1", "T3_COPE_2wk_3", "T3_COPE_2wk_4", "T3_COPE_2wk_6", "T3_COPE_2wk_8", "T3_COPE_2wk_11", "T3_COPE_2wk_16", "T3_COPE_2wk_19")]
# 
# df$T1_COPE_PFC_SumTest <- apply(df[, c("T1_COPE_2", "T1_COPE_7", "T1_COPE_10", "T1_COPE_12", "T1_COPE_14", "T1_COPE_17", "T1_COPE_23", "T1_COPE_25")], 
#                                 1, function(x) if (anyNA(x)) NA else sum(x))
# df$T1_COPE_EFC_SumTest <- apply(df[, c("T1_COPE_5", "T1_COPE_9", "T1_COPE_13", "T1_COPE_15", "T1_COPE_18", "T1_COPE_20", "T1_COPE_21", "T1_COPE_22", "T1_COPE_24", "T1_COPE_26", "T1_COPE_27", "T1_COPE_28")], 
#                                 1, function(x) if (anyNA(x)) NA else sum(x))
# df$T1_COPE_AVO_SumTest <- apply(df[, c("T1_COPE_1", "T1_COPE_3", "T1_COPE_4", "T1_COPE_6", "T1_COPE_8", "T1_COPE_11", "T1_COPE_16", "T1_COPE_19")], 
#                                 1, function(x) if (anyNA(x)) NA else sum(x))
# 
# df$T1_COPE_2wk_PFC_SumTest <- apply(df[, c("T1_COPE_2wk_2", "T1_COPE_2wk_7", "T1_COPE_2wk_10", "T1_COPE_2wk_12", "T1_COPE_2wk_14", "T1_COPE_2wk_17", "T1_COPE_2wk_23", "T1_COPE_2wk_25")], 
#                                     1, function(x) if (anyNA(x)) NA else sum(x))
# df$T1_COPE_2wk_EFC_SumTest <- apply(df[, c("T1_COPE_2wk_5", "T1_COPE_2wk_9", "T1_COPE_2wk_13", "T1_COPE_2wk_15", "T1_COPE_2wk_18", "T1_COPE_2wk_20", "T1_COPE_2wk_21", "T1_COPE_2wk_22", "T1_COPE_2wk_24", "T1_COPE_2wk_26", "T1_COPE_2wk_27", "T1_COPE_2wk_28")], 
#                                     1, function(x) if (anyNA(x)) NA else sum(x))
# df$T1_COPE_2wk_AVO_SumTest <- apply(df[, c("T1_COPE_2wk_1", "T1_COPE_2wk_3", "T1_COPE_2wk_4", "T1_COPE_2wk_6", "T1_COPE_2wk_8", "T1_COPE_2wk_11", "T1_COPE_2wk_16", "T1_COPE_2wk_19")], 
#                                     1, function(x) if (anyNA(x)) NA else sum(x))
# 
# simple_table <- df[c("PID", "T1_COPE_PFC_SumTest", "T1_COPE_PFC")]
# simple_table <- df[c("PID", "T1_COPE_EFC_SumTest", "T1_COPE_EFC")]
# simple_table <- df[c("PID", "T1_COPE_AVO_SumTest", "T1_COPE_AVO")]
# simple_table <- df[c("PID", "T2_COPE_2wk_PFC_SumTest", "T2_COPE_2wk_PFC")]
# simple_table <- df[c("PID", "T1_COPE_2wk_EFC_SumTest", "T2_COPE_2wk_EFC")]
# simple_table <- df[c("PID", "T1_COPE_2wk_AVO_SumTest", "T2_COPE_2wk_AVO")]
# 
# #Remove tests
# df <- df[, !(names(df) %in% c("T1_COPE_PFC_SumTest", "T1_COPE_EFC_SumTest", "T1_COPE_AVO_SumTest",
#                               "T1_COPE_2wk_PFC_SumTest", "T1_COPE_2wk_EFC_SumTest", "T1_COPE_2wk_AVO_SumTest"))]
# 
# #CST cleaning
# hist(df$CST_switchcost.1)
# #clear significant outliers, down to -5000ms
# 
# z_scores <- scale(df$CST_switchcost.1)
# outliers <- df[abs(z_scores) > 3, ]
# outliers$PID
# #3 outliers: 657dc797904236828c29b93f, 2037, 65c9ee38e4e029a0087683d7
# #take the values and make them NA
# df <- df %>%
#   mutate(CST_switchcost.1 = if_else(PID %in% c("657dc797904236828c29b93f", "2037", "65c9ee38e4e029a0087683d7"), 
#                                     NA_real_, 
#                                     CST_switchcost.1))
# 
# #PSS4
# #reverse score items 2 and 3
# df$T1_PSS4_Q2_R <- 4 - df$T1_PSS4_Q2
# df$T1_PSS4_Q3_R <- 4 - df$T1_PSS4_Q3
# df$T2_PSS4_Q2_R <- 4 - df$T2_PSS4_Q2
# df$T2_PSS4_Q3_R <- 4 - df$T2_PSS4_Q3
# df$T3_PSS4_Q2_R <- 4 - df$T3_PSS4_Q2
# df$T3_PSS4_Q3_R <- 4 - df$T3_PSS4_Q3
# 
# simple_table <- df[c("PID", "T1_PSS4_Q2_R", "T1_PSS4_Q2", "T1_PSS4_Q3_R", "T1_PSS4_Q3")]
# 
# df$T1_PSS4_SumTest <- apply(df[, c("T1_PSS4_Q1", "T1_PSS4_Q2_R", "T1_PSS4_Q3_R", "T1_PSS4_Q4")], 
#                             1, function(x) if (anyNA(x)) NA else sum(x))
# 
# df$T2_PSS4_SumTest <- apply(df[, c("T2_PSS4_Q1", "T2_PSS4_Q2_R", "T2_PSS4_Q3_R", "T2_PSS4_Q4")], 
#                             1, function(x) if (anyNA(x)) NA else sum(x))
# 
# df$T3_PSS4_SumTest <- apply(df[, c("T3_PSS4_Q1", "T3_PSS4_Q2_R", "T3_PSS4_Q3_R", "T3_PSS4_Q4")], 
#                             1, function(x) if (anyNA(x)) NA else sum(x))
# 
# #check that it worked
# simple_table <- df[c("PID", "T1_PSS4", "T1_PSS4_SumTest", "T2_PSS4", "T2_PSS4_SumTest", "T2_PSS4_Q1", "T2_PSS4_Q2", "T2_PSS4_Q2_R", "T2_PSS4_Q3","T2_PSS4_Q3_R", "T2_PSS4_Q4", "T3_PSS4", "T3_PSS4_SumTest")]
# 
# #redo scoring bc some values should be NA and are 0 in current.
# df$T1_PSS4 <- df$T1_PSS4_SumTest
# df$T2_PSS4 <- df$T2_PSS4_SumTest
# df$T3_PSS4 <- df$T3_PSS4_SumTest
# 
# #it worked, so let's remove the test variable
# df <- df[, !(names(df) %in% c("T1_PSS4_SumTest", "T2_PSS4_SumTest", "T3_PSS4_SumTest"))]  # Remove multiple columns
# 
# #BAT12
# #check scoring
# 
# # T1 Burnout Scores
# df$T1_BAT12_SumTest <- apply(df[, c("T1_Burnout_Q1", "T1_Burnout_Q2", "T1_Burnout_Q3", 
#                                     "T1_Burnout_Q4", "T1_Burnout_Q5", "T1_Burnout_Q6", 
#                                     "T1_Burnout_Q7", "T1_Burnout_Q8", "T1_Burnout_Q9", 
#                                     "T1_Burnout_Q10", "T1_Burnout_Q11", "T1_Burnout_Q12")], 
#                              1, function(x) if (anyNA(x)) NA else sum(x))
# 
# 
# df$T2_BAT12_SumTest <- apply(df[, c("T2_Burnout_Q1", "T2_Burnout_Q2", "T2_Burnout_Q3", 
#                                     "T2_Burnout_Q4", "T2_Burnout_Q5", "T2_Burnout_Q6", 
#                                     "T2_Burnout_Q7", "T2_Burnout_Q8", "T2_Burnout_Q9", 
#                                     "T2_Burnout_Q10", "T2_Burnout_Q11", "T2_Burnout_Q12")], 
#                              1, function(x) if (anyNA(x)) NA else sum(x))
# 
# df$T3_BAT12_SumTest <- apply(df[, c("T3_Burnout_Q1", "T3_Burnout_Q2", "T3_Burnout_Q3", 
#                                     "T3_Burnout_Q4", "T3_Burnout_Q5", "T3_Burnout_Q6", 
#                                     "T3_Burnout_Q7", "T3_Burnout_Q8", "T3_Burnout_Q9", 
#                                     "T3_Burnout_Q10", "T3_Burnout_Q11", "T3_Burnout_Q12")], 
#                              1, function(x) if (anyNA(x)) NA else sum(x))
# 
# #check that it worked
# simple_table <- df[c("PID", "T1_BAT12_SumTest", "T1_BAT12", "T2_BAT12_SumTest", "T2_BAT12")]
# #some PIDs have discrepancies between NA and 0, new scoring worked.
# 
# df$T1_BAT12 <- df$T1_BAT12_SumTest
# df$T2_BAT12 <- df$T2_BAT12_SumTest
# df$T3_BAT12 <- df$T3_BAT12_SumTest
# 
# #remove the test variable
# df <- df[, !(names(df) %in% c("T1_BAT12_SumTest", "T2_BAT12_SumTest", "T3_BAT12_SumTest"))]  # Remove multiple columns
# 
# #sum the subscale scores
# # Sum all items within each burnout subscale for T1
# df$T1_BAT12_Exhaustion <- rowSums(df[, c("T1_Burnout_Q1", "T1_Burnout_Q2", "T1_Burnout_Q3")])
# df$T1_BAT12_MentalDistance <- rowSums(df[, c("T1_Burnout_Q4", "T1_Burnout_Q5", "T1_Burnout_Q6")])
# df$T1_BAT12_Cognitive <- rowSums(df[, c("T1_Burnout_Q7", "T1_Burnout_Q8", "T1_Burnout_Q9")])
# df$T1_BAT12_Emotion <- rowSums(df[, c("T1_Burnout_Q10", "T1_Burnout_Q11", "T1_Burnout_Q12")])
# 
# # Sum all items within each burnout subscale
# df$T2_BAT12_Exhaustion <- rowSums(df[, c("T2_Burnout_Q1", "T2_Burnout_Q2", "T2_Burnout_Q3")])
# df$T2_BAT12_MentalDistance <- rowSums(df[, c("T2_Burnout_Q4", "T2_Burnout_Q5", "T2_Burnout_Q6")])
# df$T2_BAT12_Cognitive <- rowSums(df[, c("T2_Burnout_Q7", "T2_Burnout_Q8", "T2_Burnout_Q9")])
# df$T2_BAT12_Emotion <- rowSums(df[, c("T2_Burnout_Q10", "T2_Burnout_Q11", "T2_Burnout_Q12")])
# 
# # Sum all items within each burnout subscale for T3
# df$T3_BAT12_Exhaustion <- rowSums(df[, c("T3_Burnout_Q1", "T3_Burnout_Q2", "T3_Burnout_Q3")])
# df$T3_BAT12_MentalDistance <- rowSums(df[, c("T3_Burnout_Q4", "T3_Burnout_Q5", "T3_Burnout_Q6")])
# df$T3_BAT12_Cognitive <- rowSums(df[, c("T3_Burnout_Q7", "T3_Burnout_Q8", "T3_Burnout_Q9")])
# df$T3_BAT12_Emotion <- rowSums(df[, c("T3_Burnout_Q10", "T3_Burnout_Q11", "T3_Burnout_Q12")])

12.3 MI preparation

The following section ensures that variables are in the correct format to produce the regressions from which the result informed the variables included in the multiple imputation. These processes were applied to the original dataset, updated via this code, and saved as a cleaned dataset.

Code
#Binge drinking 
#Make the binge drinking variable a binary 1 and 0 for bingeing in the last 2 weeks.
#Assign a 0 if the person did not answer the Q based on not having drunk in the last 2 weeks.
# 
# simple.table <- df[, c("PID", "T1_Binge_Freq", "T1_Substance_Q2", "T1_Binge_Freq_MI")]
# 
# df <- df %>%
#   mutate(
#     T1_Binge_Freq_MI = case_when(
#       T1_Substance_Q2 %in% c(1, 2) ~ 0,  # No use → 0
#       T1_Binge_Freq == 1 ~ 0,           # Did not binge → 0
#       T1_Binge_Freq %in% 2:4 ~ T1_Binge_Freq - 1,  # Shift 2:4 → 1:3
#       TRUE ~ NA_real_
#     ),
#     
#     T2_Binge_Freq_MI = case_when(
#       T2_Substance_Q2 %in% c(1, 2) ~ 0,
#       T2_Binge_Freq == 1 ~ 0,
#       T2_Binge_Freq %in% 2:4 ~ T2_Binge_Freq - 1,
#       TRUE ~ NA_real_
#     )
#   )
# 
simple.table <- df[, c("PID", "T1_Binge_Freq_MI", "T1_Binge_Freq", "T1_Substance_Q2")]
# 
# #ADNM8
# #prep ADNM8 count
# "T1_ADNM8_A" %in% colnames(df)
# #false 
# # Vector of variable names
# adnm_items <- paste0("T1_ADNM8_A_", 1:17)
# 
# # First, ensure all variables are numeric
# df[adnm_items] <- lapply(df[adnm_items], function(x) as.numeric(as.character(x)))
# 
# summary(df[, adnm_items])
# 
# #change scoring to 0 and 1
# df[adnm_items] <- lapply(df[adnm_items], function(x) ifelse(x == 2, 1,
#                                                             ifelse(x == 1, 0, NA)))
# 
# #check it 
# simple.table <- df[, c("PID", "T1_ADNM8_A_1", "T1_ADNM8_A_2", "T1_ADNM8_A_3", "T1_ADNM8_A_4")]
# 
# # Now calculate the row sums
# df$T1_ADNM8_A <- rowSums(df[, adnm_items], na.rm = TRUE)
# 
# # Set to NA where all contributing values were NA
# all_na <- apply(df[, adnm_items], 1, function(x) all(is.na(x)))
# 
# df$T1_ADNM8_A[all_na] <- NA
# 
# #check it 
simple.table <- df[, c("PID", "T1_ADNM8_A", "T1_ADNM8_A_1", "T1_ADNM8_A_2", "T1_ADNM8_A_3", "T1_ADNM8_A_4")]
# 
# # recategorise ethnicity variables
# df <- df %>%
#   mutate(
#     T1_Ethnicity = as.character(T1_Ethnicity),  # Ensure it's character for regex
#     Ethnicity_White = case_when(
#       is.na(T1_Ethnicity) ~ NA_real_,
#       grepl("\\b1\\b", T1_Ethnicity) ~ 1,
#       TRUE ~ 0
#     ),
#     Ethnicity_AsianPI = case_when(
#       is.na(T1_Ethnicity) ~ NA_real_,
#       grepl("\\b5\\b", T1_Ethnicity) |  # Asian
#         grepl("\\b6\\b", T1_Ethnicity) |  # South Asian
#         grepl("\\b7\\b", T1_Ethnicity) ~ 1,  # Pacific Islander
#       TRUE ~ 0
#     ),
#     Ethnicity_BlackOther = case_when(
#       is.na(T1_Ethnicity) ~ NA_real_,
#       grepl("\\b2\\b", T1_Ethnicity) |  # Hispanic or Latino
#         grepl("\\b3\\b", T1_Ethnicity) |  # Black or African American
#         grepl("\\b4\\b", T1_Ethnicity) |  # African
#         grepl("\\b8\\b", T1_Ethnicity) |  # Aboriginal or Torres Strait
#         grepl("\\b9\\b", T1_Ethnicity) |  # Middle Eastern
#         grepl("\\b10\\b", T1_Ethnicity) ~ 1,  # Other
#       TRUE ~ 0
#     )
#   )
# 

# #education 
# df <- df %>%
#   mutate(
#     T1_EducationMI = case_when(
#       T1_Education %in% c(1, 2, 8) ~ "School only",
#       T1_Education %in% c(3, 4) ~ "Vocational",
#       T1_Education == 5 ~ "University (Bachelor)",
#       T1_Education %in% c(6, 7) ~ "University (Postgrad)",
#       TRUE ~ NA_character_
#     ),
#     T1_EducationMI = factor(
#       T1_EducationMI,
#       levels = c(
#         "School only",
#         "Vocational",
#         "University (Bachelor)",
#         "University (Postgrad)"
#       )
#     )
#   )
# 
table(df$T1_EducationMI, useNA = "ifany")

          School only University (Bachelor) University (Postgrad) 
                   81                   145                    76 
           Vocational 
                   35 
Code
# 
# #employment 
# simple.table <- df[, c("PID", "T1_Employment_recoded")]
# 
# df <- df %>%
#   mutate(
#     T1_EmploymentMI = case_when(
#       T1_Employment_recoded == 1 ~ "Work & Study",
#       T1_Employment_recoded == 2 ~ "Work only",
#       T1_Employment_recoded == 3 ~ "Study only",
#       TRUE ~ NA_character_
#     ),
#     T1_EmploymentMI = factor(
#       T1_EmploymentMI,
#       levels = c("Work & Study", "Work only", "Study only")
#     )
#   )
# 
# #dummy code employment
# df <- df %>%
#   mutate(
#     Emp_WorkOnly = ifelse(T1_EmploymentMI == "Work only", 1,
#                           ifelse(is.na(T1_EmploymentMI), NA, 0)),
#     Emp_StudyOnly = ifelse(T1_EmploymentMI == "Study only", 1,
#                            ifelse(is.na(T1_EmploymentMI), NA, 0))
#   )
# 
simple.table <- df[, c("PID", "Emp_WorkOnly", "Emp_StudyOnly")]
# 
# #Income - make ordered
# df <- df %>%
#   mutate(
#     T1_Income_ord = factor(T1_Income, levels = 1:12, ordered = TRUE)
#   )
# 
# levels(df$T1_Income_ord)
# 
# #change variable structure where needed
# #COB
# table(df$T1_COBAustralia)
# df$T1_COBAustralia <- factor(df$T1_COBAustralia, levels = c(1, 2), labels = c("COBAustralia", "COBNotAustralia"))
# #Gender labels
# df$T1_Gender_MW <- factor(df$T1_Gender_MW, levels = c(1, 2), labels = c("Man", "Woman"))
# #Ordinal for handedness
# table(df$T1_Handedness, useNA = "ifany")
# df <- df %>%
#   mutate(T1_Handedness_num = as.numeric(T1_Handedness))
# 
# #create variable for 'complete' for MI 
# df <- df %>%
#   mutate(T2_CompleteMI = ifelse(is.na(T2_Progress), 0, ifelse(T2_Progress > 60, 1, 0)))
# 
# #check it
simple.table <- df[, c("PID", "T2_Progress", "T2_CompleteMI")]